[UNIX] CGI SAPI Security Vulnerability

From: support@securiteam.com
Date: 02/17/03

  • Next message: support@securiteam.com: "[NEWS] ORACLE bfilename Function Buffer Overflow Vulnerability"
    From: support@securiteam.com
    To: list@securiteam.com
    Date: 17 Feb 2003 22:36:21 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    Beyond Security would like to welcome Tiscali World Online
    to our service provider team.
    For more info on their service offering IP-Secure,
    please visit http://www.worldonline.co.za/services/work_ip.asp
    - - - - - - - - -

      CGI SAPI Security Vulnerability
    ------------------------------------------------------------------------

    SUMMARY

    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 version 4.3.0 there is a bug that renders
    these options useless.

    NOTE: This bug does NOT affect any of the other SAPI modules (such as the
    Apache or ISAPI modules, etc.).

    DETAILS

    Vulnerable systems:
     * PHP version 4.3.0

    Immune systems:
     * PHP version 4.3.1

    Impact:
    Anyone with access to websites hosted on a web server that employs the CGI
    module may exploit this vulnerability to gain access to any file readable
    by the user under which the web server 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.

    Solution:
    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
     <http://www.php.net/downloads.php> http://www.php.net/downloads.php

    This URL links to the source tarballs, Windows binaries, and source patch
    from 4.3.0. You will only need to upgrade if you are using the CGI module
    of PHP 4.3.0. There are no other bug fixes contained in this release.

    ADDITIONAL INFORMATION

    The information has been provided by <mailto:sniper@php.net> Jani
    Taskinen.

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



    Relevant Pages

    • php died?
      ... I have a web site created with FMStudio. ... I uninstalled php ... and reinstalled, with CGI, Curl and GD2 still reports 'fail' ... I uninstalled php 5.2.6 and tried to install 5.2.8, ...
      (comp.databases.filemaker)
    • 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 ...
      (comp.lang.lisp)
    • 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 ...
      (Security-Basics)
    • Re: Re[2]: [PHP] check if a file is included
      ... Provides real PATH_INFO/PATH_TRANSLATED support for CGI. ... this to 1 will cause PHP CGI to fix it's paths to conform to the spec. ... Tested on both local and network locations as well as from web server, ...
      (php.general)
    • 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, ...
      (comp.programming)