Vulnerabilities > CVE-2006-0996 - Cross-site Scripting vulnerability in PHP 4.4.2/5.1.2
Attack vector
UNKNOWN Attack complexity
UNKNOWN Privileges required
UNKNOWN Confidentiality impact
UNKNOWN Integrity impact
UNKNOWN Availability impact
UNKNOWN Summary
Cross-site scripting (XSS) vulnerability in phpinfo (info.c) in PHP 5.1.2 and 4.4.2 allows remote attackers to inject arbitrary web script or HTML via long array variables, including (1) a large number of dimensions or (2) long values, which prevents HTML tags from being removed.
Common Weakness Enumeration (CWE)
Common Attack Pattern Enumeration and Classification (CAPEC)
- Cross Site Scripting through Log Files An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
- Embedding Scripts in Non-Script Elements This attack is a form of Cross-Site Scripting (XSS) where malicious scripts are embedded in elements that are not expected to host scripts such as image tags (<img>), comments in XML documents (< !-CDATA->), etc. These tags may not be subject to the same input validation, output validation, and other content filtering and checking routines, so this can create an opportunity for an attacker to tunnel through the application's elements and launch a XSS attack through other elements. As with all remote attacks, it is important to differentiate the ability to launch an attack (such as probing an internal network for unpatched servers) and the ability of the remote attacker to collect and interpret the output of said attack.
- Embedding Scripts within Scripts An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute scripts. The attacker leverages this capability to execute scripts to execute his/her own script by embedding it within other scripts that the target software is likely to execute. The attacker must have the ability to inject script into script that is likely to be executed. If this is done, then the attacker can potentially launch a variety of probes and attacks against the web server's local environment, in many cases the so-called DMZ, back end resources the web server can communicate with, and other hosts. With the proliferation of intermediaries, such as Web App Firewalls, network devices, and even printers having JVMs and Web servers, there are many locales where an attacker can inject malicious scripts. Since this attack pattern defines scripts within scripts, there are likely privileges to execute said attack on the host. Of course, these attacks are not solely limited to the server side, client side scripts like Ajax and client side JavaScript can contain malicious scripts as well. In general all that is required is for there to be sufficient privileges to execute a script, but not protected against writing.
- Cross-Site Scripting in Error Pages An attacker distributes a link (or possibly some other query structure) with a request to a third party web server that is malformed and also contains a block of exploit code in order to have the exploit become live code in the resulting error page. When the third party web server receives the crafted request and notes the error it then creates an error message that echoes the malformed message, including the exploit. Doing this converts the exploit portion of the message into to valid language elements that are executed by the viewing browser. When a victim executes the query provided by the attacker the infected error message error message is returned including the exploit code which then runs in the victim's browser. XSS can result in execution of code as well as data leakage (e.g. session cookies can be sent to the attacker). This type of attack is especially dangerous since the exploit appears to come from the third party web server, who the victim may trust and hence be more vulnerable to deception.
- Cross-Site Scripting Using Alternate Syntax The attacker uses alternate forms of keywords or commands that result in the same action as the primary form but which may not be caught by filters. For example, many keywords are processed in a case insensitive manner. If the site's web filtering algorithm does not convert all tags into a consistent case before the comparison with forbidden keywords it is possible to bypass filters (e.g., incomplete black lists) by using an alternate case structure. For example, the "script" tag using the alternate forms of "Script" or "ScRiPt" may bypass filters where "script" is the only form tested. Other variants using different syntax representations are also possible as well as using pollution meta-characters or entities that are eventually ignored by the rendering engine. The attack can result in the execution of otherwise prohibited functionality.
Exploit-Db
description | PHP 4.x/5.0/5.1 PHPInfo Large Input Cross-Site Scripting Vulnerability. CVE-2006-0996 . Remote exploit for php platform |
id | EDB-ID:27564 |
last seen | 2016-02-03 |
modified | 2006-04-03 |
published | 2006-04-03 |
reporter | Maksymilian Arciemowicz |
source | https://www.exploit-db.com/download/27564/ |
title | PHP 4.x/5.0/5.1 PHPInfo Large Input Cross-Site Scripting Vulnerability |
Nessus
NASL family Gentoo Local Security Checks NASL id GENTOO_GLSA-200605-08.NASL description The remote host is affected by the vulnerability described in GLSA-200605-08 (PHP: Multiple vulnerabilities) Several vulnerabilities were discovered on PHP4 and PHP5 by Infigo, Tonu Samuel and Maksymilian Arciemowicz. These included a buffer overflow in the wordwrap() function, restriction bypasses in the copy() and tempname() functions, a cross-site scripting issue in the phpinfo() function, a potential crash in the substr_compare() function and a memory leak in the non-binary-safe html_entity_decode() function. Impact : Remote attackers might be able to exploit these issues in PHP applications making use of the affected functions, potentially resulting in the execution of arbitrary code, Denial of Service, execution of scripted contents in the context of the affected site, security bypass or information leak. Workaround : There is no known workaround at this point. last seen 2020-06-01 modified 2020-06-02 plugin id 21350 published 2006-05-13 reporter This script is Copyright (C) 2006-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/21350 title GLSA-200605-08 : PHP: Multiple vulnerabilities NASL family CGI abuses NASL id PHP_4_4_3.NASL description According to its banner, the version of PHP installed on the remote host is older than 4.4.3 / 5.1.4. Such versions may be affected by several issues, including a buffer overflow, heap corruption, and a flaw by which a variable may survive a call to last seen 2020-06-01 modified 2020-06-02 plugin id 22268 published 2006-08-25 reporter This script is Copyright (C) 2006-2018 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/22268 title PHP < 4.4.3 / 5.1.4 Multiple Vulnerabilities NASL family CentOS Local Security Checks NASL id CENTOS_RHSA-2006-0276.NASL description Updated PHP packages that fix multiple security issues are now available for Red Hat Enterprise Linux 3 and 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. PHP is an HTML-embedded scripting language commonly used with the Apache HTTP Web server. The phpinfo() PHP function did not properly sanitize long strings. An attacker could use this to perform cross-site scripting attacks against sites that have publicly-available PHP scripts that call phpinfo(). (CVE-2006-0996) The html_entity_decode() PHP function was found to not be binary safe. An attacker could use this flaw to disclose a certain part of the memory. In order for this issue to be exploitable the target site would need to have a PHP script which called the last seen 2020-06-01 modified 2020-06-02 plugin id 21897 published 2006-07-03 reporter This script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/21897 title CentOS 3 / 4 : php (CESA-2006:0276) NASL family Fedora Local Security Checks NASL id FEDORA_2006-289.NASL description This update includes the latest release of PHP 5, version 5.1.4. This release includes fixes for several security issues and many bug fixes. The phpinfo() PHP function did not properly sanitize long strings. An attacker could use this to perform cross-site scripting attacks against sites that have publicly-available PHP scripts that call phpinfo(). (CVE-2006-0996) The html_entity_decode() PHP function was found to not be binary safe. An attacker could use this flaw to disclose a certain part of the memory. In order for this issue to be exploitable the target site would need to have a PHP script which called the last seen 2020-06-01 modified 2020-06-02 plugin id 24083 published 2007-01-17 reporter This script is Copyright (C) 2007-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/24083 title Fedora Core 5 : php-5.1.4-1 (2006-289) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2006-0276.NASL description Updated PHP packages that fix multiple security issues are now available for Red Hat Enterprise Linux 3 and 4. This update has been rated as having moderate security impact by the Red Hat Security Response Team. PHP is an HTML-embedded scripting language commonly used with the Apache HTTP Web server. The phpinfo() PHP function did not properly sanitize long strings. An attacker could use this to perform cross-site scripting attacks against sites that have publicly-available PHP scripts that call phpinfo(). (CVE-2006-0996) The html_entity_decode() PHP function was found to not be binary safe. An attacker could use this flaw to disclose a certain part of the memory. In order for this issue to be exploitable the target site would need to have a PHP script which called the last seen 2020-06-01 modified 2020-06-02 plugin id 21287 published 2006-04-26 reporter This script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/21287 title RHEL 3 / 4 : php (RHSA-2006:0276) NASL family Red Hat Local Security Checks NASL id REDHAT-RHSA-2006-0501.NASL description Updated PHP packages that fix multiple security issues are now available for Red Hat Enterprise Linux 2.1. This update has been rated as having moderate security impact by the Red Hat Security Response Team. PHP is an HTML-embedded scripting language commonly used with the Apache HTTP Web server. The phpinfo() PHP function did not properly sanitize long strings. An attacker could use this to perform cross-site scripting attacks against sites that have publicly-available PHP scripts that call phpinfo(). (CVE-2006-0996) The error handling output was found to not properly escape HTML output in certain cases. An attacker could use this flaw to perform cross-site scripting attacks against sites where both display_errors and html_errors are enabled. (CVE-2006-0208) A buffer overflow flaw was discovered in uw-imap, the University of Washington last seen 2020-06-01 modified 2020-06-02 plugin id 21594 published 2006-05-24 reporter This script is Copyright (C) 2006-2019 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/21594 title RHEL 2.1 : php (RHSA-2006:0501) NASL family Ubuntu Local Security Checks NASL id UBUNTU_USN-320-1.NASL description The phpinfo() PHP function did not properly sanitize long strings. A remote attacker could use this to perform cross-site scripting attacks against sites that have publicly-available PHP scripts that call phpinfo(). Please note that it is not recommended to publicly expose phpinfo(). (CVE-2006-0996) An information disclosure has been reported in the html_entity_decode() function. A script which uses this function to process arbitrary user-supplied input could be exploited to expose a random part of memory, which could potentially reveal sensitive data. (CVE-2006-1490) The wordwrap() function did not sufficiently check the validity of the last seen 2020-06-01 modified 2020-06-02 plugin id 27897 published 2007-11-10 reporter Ubuntu Security Notice (C) 2007-2019 Canonical, Inc. / NASL script (C) 2018 and is owned by Tenable, Inc. or an Affiliate thereof. source https://www.tenable.com/plugins/nessus/27897 title Ubuntu 5.04 / 5.10 / 6.06 LTS : php4, php5 vulnerabilities (USN-320-1) NASL family Mandriva Local Security Checks NASL id MANDRAKE_MDKSA-2006-074.NASL description A cross-site scripting (XSS) vulnerability in phpinfo (info.c) in PHP <= 5.1.2 allows remote attackers to inject arbitrary web script or HTML via long array variables, including (1) a large number of dimensions or (2) long values, which prevents HTML tags from being removed. (CVE-2006-0996) Directory traversal vulnerability in file.c in PHP <= 5.1.2 allows local users to bypass open_basedir restrictions and allows remote attackers to create files in arbitrary directories via the tempnam function. (CVE-2006-1494) The copy function in file.c in PHP <= 5.1.2 allows local users to bypass safe mode and read arbitrary files via a source argument containing a compress.zlib:// URI. (CVE-2006-1608) Updated packages have been patched to address these issues. After upgrading these packages, please run last seen 2020-06-01 modified 2020-06-02 plugin id 21281 published 2006-04-26 reporter This script is Copyright (C) 2006-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/21281 title Mandrake Linux Security Advisory : php (MDKSA-2006:074) NASL family SuSE Local Security Checks NASL id SUSE_SA_2006_024.NASL description The remote host is missing the patch for the advisory SUSE-SA:2006:024 (php4,php5). This update fixes the following security issues in the scripting languages PHP4 and PHP5: - copy() and tempnam() functions could bypass open_basedir restrictions (CVE-2006-1494) - Cross-Site-Scripting (XSS) bug in phpinfo() (CVE-2006-0996) - mb_send_mail() lacked safe_mode checks (CVE-2006-1014, CVE-2006-1015) - html_entity_decode() could expose memory content (CVE-2006-1490) last seen 2019-10-28 modified 2006-05-13 plugin id 21369 published 2006-05-13 reporter This script is Copyright (C) 2006-2019 Tenable Network Security, Inc. source https://www.tenable.com/plugins/nessus/21369 title SUSE-SA:2006:024: php4,php5
Oval
accepted | 2013-04-29T04:10:34.748-04:00 | ||||||||||||||||||||
class | vulnerability | ||||||||||||||||||||
contributors |
| ||||||||||||||||||||
definition_extensions |
| ||||||||||||||||||||
description | Cross-site scripting (XSS) vulnerability in phpinfo (info.c) in PHP 5.1.2 and 4.4.2 allows remote attackers to inject arbitrary web script or HTML via long array variables, including (1) a large number of dimensions or (2) long values, which prevents HTML tags from being removed. | ||||||||||||||||||||
family | unix | ||||||||||||||||||||
id | oval:org.mitre.oval:def:10997 | ||||||||||||||||||||
status | accepted | ||||||||||||||||||||
submitted | 2010-07-09T03:56:16-04:00 | ||||||||||||||||||||
title | Cross-site scripting (XSS) vulnerability in phpinfo (info.c) in PHP 5.1.2 and 4.4.2 allows remote attackers to inject arbitrary web script or HTML via long array variables, including (1) a large number of dimensions or (2) long values, which prevents HTML tags from being removed. | ||||||||||||||||||||
version | 26 |
Redhat
advisories |
| ||||||||||||
rpms |
|
References
- ftp://patches.sgi.com/support/free/security/advisories/20060501-01-U.asc
- ftp://patches.sgi.com/support/free/security/advisories/20060501-01-U.asc
- http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/info.c
- http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/info.c
- http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/info.c?r1=1.260&r2=1.261
- http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/info.c?r1=1.260&r2=1.261
- http://marc.info/?l=php-cvs&m=114374620416389&w=2
- http://marc.info/?l=php-cvs&m=114374620416389&w=2
- http://rhn.redhat.com/errata/RHSA-2006-0276.html
- http://rhn.redhat.com/errata/RHSA-2006-0276.html
- http://rhn.redhat.com/errata/RHSA-2006-0549.html
- http://rhn.redhat.com/errata/RHSA-2006-0549.html
- http://secunia.com/advisories/19599
- http://secunia.com/advisories/19599
- http://secunia.com/advisories/19775
- http://secunia.com/advisories/19775
- http://secunia.com/advisories/19832
- http://secunia.com/advisories/19832
- http://secunia.com/advisories/19979
- http://secunia.com/advisories/19979
- http://secunia.com/advisories/20052
- http://secunia.com/advisories/20052
- http://secunia.com/advisories/20210
- http://secunia.com/advisories/20210
- http://secunia.com/advisories/20222
- http://secunia.com/advisories/20222
- http://secunia.com/advisories/20951
- http://secunia.com/advisories/20951
- http://secunia.com/advisories/21125
- http://secunia.com/advisories/21125
- http://secunia.com/advisories/21252
- http://secunia.com/advisories/21252
- http://secunia.com/advisories/21564
- http://secunia.com/advisories/21564
- http://security.gentoo.org/glsa/glsa-200605-08.xml
- http://security.gentoo.org/glsa/glsa-200605-08.xml
- http://securityreason.com/achievement_securityalert/34
- http://securityreason.com/achievement_securityalert/34
- http://securityreason.com/securityalert/675
- http://securityreason.com/securityalert/675
- http://securitytracker.com/id?1015879
- http://securitytracker.com/id?1015879
- http://support.avaya.com/elmodocs2/security/ASA-2006-129.htm
- http://support.avaya.com/elmodocs2/security/ASA-2006-129.htm
- http://support.avaya.com/elmodocs2/security/ASA-2006-160.htm
- http://support.avaya.com/elmodocs2/security/ASA-2006-160.htm
- http://www.mandriva.com/security/advisories?name=MDKSA-2006:074
- http://www.mandriva.com/security/advisories?name=MDKSA-2006:074
- http://www.novell.com/linux/security/advisories/05-05-2006.html
- http://www.novell.com/linux/security/advisories/05-05-2006.html
- http://www.osvdb.org/24484
- http://www.osvdb.org/24484
- http://www.php.net/ChangeLog-4.php#4.4.3
- http://www.php.net/ChangeLog-4.php#4.4.3
- http://www.redhat.com/support/errata/RHSA-2006-0501.html
- http://www.redhat.com/support/errata/RHSA-2006-0501.html
- http://www.securityfocus.com/bid/17362
- http://www.securityfocus.com/bid/17362
- http://www.ubuntu.com/usn/usn-320-1
- http://www.ubuntu.com/usn/usn-320-1
- http://www.vupen.com/english/advisories/2006/1290
- http://www.vupen.com/english/advisories/2006/1290
- http://www.vupen.com/english/advisories/2006/2685
- http://www.vupen.com/english/advisories/2006/2685
- https://exchange.xforce.ibmcloud.com/vulnerabilities/25702
- https://exchange.xforce.ibmcloud.com/vulnerabilities/25702
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10997
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10997