Description
The addslashes function in PHP 4.3.9 does not properly escape a NULL (/0) character, which may allow remote attackers to read arbitrary files in PHP applications that contain a directory traversal vulnerability in require or include statements, but are otherwise protected by the magic_quotes_gpc mechanism. NOTE: this issue was originally REJECTed by its CNA before publication, but that decision is in active dispute. This candidate may change significantly in the future as a result of further discussion.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PHP 4/5 - 'addslashes()' Null Byte Bypass EDB-24985 · remote · Dec 16, 2004 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
References
- php-addslashes-view-files(18516) vdb-entry
- http://www.php.net/release_4_3_10.php
- MDKSA-2004:151 vendor-advisory
- 11981 vdb-entry
- 20041216 PHP Input Validation Vulnerabilities mailing-list
- CLA-2005:915 vendor-advisory
- GLSA-200412-14 vendor-advisory
- HPSBMA01212 vendor-advisory