[Full-Disclosure] [ GLSA 200402-01 ] PHP setting leaks from .htaccess files on virtual hosts

From: Tim Yamin (plasmaroo_at_gentoo.org)
Date: 02/07/04

  • Next message: Curt Purdy: "RE: [inbox] [Full-Disclosure] Unbelievable: I just got sensored"
    To: bugtraq@securityfocus.com, full-disclosure@lists.netsys.com, security-alerts@linuxsecurity.com, gentoo-core@gentoo.org, gentoo-announce@gentoo.org
    Date: Sat, 07 Feb 2004 01:02:40 +0000
    
    

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Gentoo Linux Security Advisory GLSA 200402-01
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ~ http://security.gentoo.org
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    ~ Severity: Normal
    ~ Title: PHP setting leaks from .htaccess files on virtual hosts
    ~ Date: February 07, 2004
    ~ Bugs: #39952
    ~ ID: 200402-01

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    Synopsis
    ========

    If the server configuration "php.ini" file has "register_globals = on"
    and a request is made to one virtual host (which has "php_admin_flag
    register_globals off") and the next request is sent to the another
    virtual host (which does not have the setting) through the same apache
    child, the setting will persist. This may lead to leaks of global variables.

    Background
    ==========

    PHP is a widely-used general-purpose scripting language that is
    especially suited for Web development and can be embedded into HTML.

    Description
    ===========

    If the server configuration "php.ini" file has "register_globals = on"
    and a request is made to one virtual host (which has "php_admin_flag
    register_globals off") and the next request is sent to the another
    virtual host (which does not have the setting) through the same Apache
    child, the setting will persist.

    Impact
    ======

    Depending on the server and site, an attacker may be able to exploit
    global variables to gain access to reserved areas, such as MySQL
    passwords, or this vulnerability may simply cause a lack of
    functionality. As a result, users are urged to upgrade their PHP
    installations.

    Gentoo ships PHP with "register_globals" set to "off" by default.

    This issue affects both servers running Apache 1.x and servers running
    Apache 2.x.

    Workaround
    ==========

    No immediate workaround is available; a software upgrade is required.

    Resolution
    ==========

    All users are recommended to upgrade their mod_php installation to 4.3.4-r4:

    ~ # emerge sync
    ~ # emerge -pv ">=dev-php/mod_php-4.3.4-r4"
    ~ # emerge ">=dev-php/mod_php-4.3.4-r4"

    Concerns?
    =========

    Security is a primary focus of Gentoo Linux and ensuring the
    confidentiality and security of our users machines is of utmost
    importance to us. Any security concerns should be addressed to
    security@gentoo.org or alternatively, you may file a bug at
    http://bugs.gentoo.org.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFAJDkqMMXbAy2b2EIRAhRMAJ9SDV/WHYdUDqADIp29JmqGeFQszQCdFvRV
    nCYFaIKKbzwJKHa9IUa2fvk=
    =SM5z
    -----END PGP SIGNATURE-----

    _______________________________________________
    Full-Disclosure - We believe in it.
    Charter: http://lists.netsys.com/full-disclosure-charter.html


  • Next message: Curt Purdy: "RE: [inbox] [Full-Disclosure] Unbelievable: I just got sensored"

    Relevant Pages

    • Re: cgi-bin not visible to apache with virtualhosts
      ... >>Try adding a ScriptAlias to the virtual host. ... offering both namebased and IP based hosting with Apache. ... # recommended that all directives be kept in a single file for simplicity. ... # one request per connection). ...
      (comp.os.linux.networking)
    • Weird open_basedir behaviour
      ... running apache 2.0.48 with php 4.3.4. ... applying it to a different virtual host, ...
      (php.general)
    • Re: [ GLSA 200402-01 ] PHP setting leaks from .htaccess files on virtual hosts
      ... TY> and a request is made to one virtual host (which has "php_admin_flag ... TY> virtual host through the same apache ... TY> child, the setting will persist. ...
      (Bugtraq)
    • Re: [PHP] Remote computer name?
      ... request - this may change depending on virtual host settings and relies ... upon the Host: header in the request. ... machine on which php is running, and is /not/ dependent on the ...
      (php.general)
    • Re: creating subdomains using php
      ... > When a user submits the registration form, how did this virtual host ... you have to see what is the requested subdomain ... a php file as query string like index.php?subdomain=%1 or so. ... different pages depending upon the request. ...
      (comp.lang.php)

    Loading