[VulnWatch] PHP Security Advisory: CGI vulnerability in PHP version 4.3.0

From: Jani Taskinen (sniper@php.net)
Date: 02/17/03

  • Next message: Mark Litchfield: "[VulnWatch] More Lotus Domino Advisories"
    Date: Mon, 17 Feb 2003 20:01:14 +0200 (EET)
    From: Jani Taskinen <sniper@php.net>
    To: php-announce@lists.php.net, <php-dev@lists.php.net>, <php-general@lists.php.net>

    Hash: SHA1

       PHP Security Advisory: CGI vulnerability in PHP version 4.3.0

    Issued on: February 17, 2003
    Software: PHP/CGI version 4.3.0
    Platforms: All

       The PHP Group has learned of a serious security vulnerability in
       the CGI SAPI of PHP version 4.3.0.


       PHP contains code for preventing direct access to the CGI binary with
       configure option "--enable-force-cgi-redirect" and php.ini option
       "cgi.force_redirect". In PHP 4.3.0 there is a bug which renders these
       options useless.
       NOTE: This bug does NOT affect any of the other SAPI modules.
             (such as the Apache or ISAPI modules, etc.)


       Anyone with access to websites hosted on a web server which employs
       the CGI module may exploit this vulnerability to gain access to any file
       readable by the user under which the webserver runs.

       A remote attacker could also trick PHP into executing arbitrary PHP code
       if attacker is able to inject the code into files accessible by the CGI.
       This could be for example the web server access-logs.


       The PHP Group has released a new PHP version, 4.3.1, which incorporates
       a fix for the vulnerability. All users of affected PHP versions are
       encouraged to upgrade to this latest version. The downloads web site at

       has the new 4.3.1 source tarballs, Windows binaries and source patch
       from 4.3.0 available for download. You will only need to upgrade if
       you're using the CGI module of PHP 4.3.0. There are no other bugfixes
       contained in this release.




       The PHP Group would like to thank Kosmas Skiadopoulos for discovering
       this vulnerability.

    Copyright (c) 2003 The PHP Group.

    Version: GnuPG v1.0.6 (GNU/Linux)
    Comment: For info see http://www.gnupg.org

    -----END PGP SIGNATURE-----

    Relevant Pages

    • Re: What websites use Lisp?
      ... languages, frameworks, and libraries are used by various websites. ... languages for their CGI applications, my personal answer is that I ... In the future I plan to switch to PHP for the ... different alias to that script for each user online at a given ...
    • Re: Apache: limiting the execution place
      ... They want it so users can't use FTP, shell, or a CGI or PHP script to view, ... other users via shell, FTP, web server processes (such as PHP or CGI ...
    • Re: Most productive web development frameworks
      ... If you don't like PHP, try CGI, in any language ... > how well PHP or CGI scales in a HA clustered environment. ... > I am really interested in peoples experience with different frameworks, ...
    • Wrapping HTML Form Output.
      ... I'm trying to use PHP to wrap the output of an HTML form before it goes ... form, which previously pointed to the C CGI script, to point to a PHP ...
    • apache php cgi install problem
      ... php is installed in c:/php ... descriptor: don't know how to spawn child process: ... in the Apache error log. ... I have no experience in CGI - I only know it stands for Common Gateway ...