SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Generic)  >   CGI.pm Vendors:   Stein, Lincoln D.
(A Patch is Available) Re: CGI.pm Library Input Validation Flaw Permits Remote Cross-Site Scripting Attacks
SecurityTracker Alert ID:  1007272
SecurityTracker URL:  http://securitytracker.com/id/1007272
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  Jul 23 2003
Impact:   Disclosure of authentication information, Disclosure of user information, Execution of arbitrary code via network, Modification of user information
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 2.98 and prior versions
Description:   An input validation vulnerability was reported in the 'CGI.pm' library. A remote user can conduct cross-site scripting attacks against an application based on the library, depending on how the library is used.

Scripts that use the start_form() function may be affected by this flaw. The function reportedly does not properly filter user-supplied input when creating web forms. A remote user can create a specially crafted URL that, when loaded by a target user, will cause arbitrary scripting code to be executed by the target user's browser. The code will originate from the site running the vulnerable software and will run in the security context of that site. As a result, the code will be able to access the target user's cookies (including authentication cookies), if any, associated with the site, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.

A demonstration exploit URL is provided:

http://host/script.pl?">some%20text<!--%20

Whether or not an application that uses the library is affected or not depends on how the library is used.

The vendor was reportedly notified on April 30, 2003.

Eye on Security reported this vulnerability.

Impact:   A remote user can access the target user's cookies (including authentication cookies), if any, associated with the site running an application based on the library, access data recently submitted by the target user via web form to the site, or take actions on the site acting as the target user.
Solution:   A user has provided a patch for the latest version (2.98). The patch is available in the Source Message.

[Editor's note: In a previous message (see Message History), the vendor indicated that the cross-site scripting flaw was corrected in version 2.4. The release of this patch may imply that the correction was not complete.]

Vendor URL:  stein.cshl.org/WWW/software/CGI/ (Links to External Site)
Cause:   Input validation error
Underlying OS:  Linux (Any), UNIX (Any), Windows (Any)

Message History:   This archive entry is a follow-up to the message listed below.
Jul 21 2003 CGI.pm Library Input Validation Flaw Permits Remote Cross-Site Scripting Attacks



 Source Message Contents

Subject:  Re: CGI.pm vulnerable to Cross-site Scripting


--------------060307010401040203080709
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

> But this was fixed long ago in version 2.94.  We're at version 2.98 now.  The 
> most up-to-date copy is always in CPAN.

  Please find attached the patch against CGI.pm version 2.98.

--
Erwann Corvellec

--------------060307010401040203080709
Content-Type: text/plain;
 name="CGI.pm-2.98-erwann_corvellec-startform-XSS-protection.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="CGI.pm-2.98-erwann_corvellec-startform-XSS-protection.patch"

--- CGI.pm.ori	2003-06-18 21:57:21.000000000 +0200
+++ CGI.pm	2003-07-23 09:53:18.000000000 +0200
@@ -1641,7 +1641,7 @@
     unless (defined $action) {
        $action = $self->url(-absolute=>1,-path=>1);
        if (length($ENV{QUERY_STRING})>0) {
-           $action .= "?$ENV{QUERY_STRING}";
+           $action .= '?' . $self->escapeHTML($ENV{QUERY_STRING},1);
        }
     }
     $action =~ s/\"/%22/g;  # fix cross-site scripting bug reported by obscure

--------------060307010401040203080709--

 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2021, SecurityGlobal.net LLC