Description
scanf.c in PHP 5.1.4 and earlier, and 4.4.3 and earlier, allows context-dependent attackers to execute arbitrary code via a sscanf PHP function call that performs argument swapping, which increments an index past the end of an array and triggers a buffer over-read.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 4 | php +13 | 4.3.9-3.18 | RHSA-2006:0669 |
| RHEL 3 | php +6 | 4.3.2-36.ent | RHSA-2006:0669 |
Show 1 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Red Hat Rhel Application Stack 1 | php +16 | 5.1.4-1.el4s1.4 | RHSA-2006:0688 |
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.4.3/5.1.4 - 'sscanf' Local Buffer Overflow EDB-2193 · local · Aug 16, 2006 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- RHSA-2006:0669 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- RHSA-2006:0688 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
References
- 1016984 vdb-entry
- http://www.plain-text.info/sscanf_bug.txt
- http://www.php.net/release_5_1_5.php
- 19415 vdb-entry
- 21768 third-party-advisory
- 21403 third-party-advisory
- RHSA-2006:0669 vendor-advisory
- MDKSA-2006:144 vendor-advisory
- oval:org.mitre.oval:def:11062 vdb-entry signature
- 21847 third-party-advisory
- SUSE-SR:2006:020 vendor-advisory
- 22487 third-party-advisory
- USN-342-1 vendor-advisory
- http://support.avaya.com/elmodocs2/security/ASA-2006-221.htm
- 22039 third-party-advisory
- RHSA-2006:0688 vendor-advisory
- http://bugs.php.net/bug.php?id=38322
- 21683 third-party-advisory
- 23247 third-party-advisory
- 21467 third-party-advisory
- SUSE-SR:2006:019 vendor-advisory
- 22004 third-party-advisory
- http://support.avaya.com/elmodocs2/security/ASA-2006-222.htm
- 22538 third-party-advisory
- RHSA-2006:0682 vendor-advisory
- 21546 third-party-advisory
- 21608 third-party-advisory
- 22440 third-party-advisory
- 22069 third-party-advisory
- 20060804 php local buffer underflow could lead to arbitary code execution mailing-list
- http://support.avaya.com/elmodocs2/security/ASA-2006-223.htm
- SUSE-SR:2006:022 vendor-advisory
- ADV-2006-3193 vdb-entry
- http://www.php.net/ChangeLog-5.php#5.1.5
- GLSA-200608-28 vendor-advisory
- 1341 third-party-advisory
- RHSA-2006:0736 vendor-advisory
- SUSE-SA:2006:052 vendor-advisory