CVE-2006-4020 json
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 func…
published 2006-08-08 20 y ago modified 2026-06-16 4 mo ago also EUVD-2006-4013
- cvss
- 4.6
- version 2.0, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.0%
- EPSS 2.0% chance of exploitation in 30 days, percentile 81%
- public exploits
- 1
- Exploit-DB
Summary
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.
Patch / fix
- php RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-gd RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-dba RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-pdo RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-xml RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-imap RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-ldap RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
- php-odbc RHEL 1 APPLICATION_STACK 5.1.4-1.el4s1.4
red hat advisories RHSA-2006:0688RHSA-2006:0669
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2006-4020 updated
security flaw
-
Red Hat Application Stack v1 for Enterprise Linux AS (v.4) php 5.1.4-1.el4s1.4, php-gd 5.1.4-1.el4s1.4, php-dba 5.1.4-1.el4s1.4, php-pdo 5.1.4-1.el4s1.4, php-xml 5.1.4-1.el4s1.4, php-imap 5.1.4-1.el4s1.4, +10 more Red Hat Application Stack v1 for Enterprise Linux ES (v.4) php 5.1.4-1.el4s1.4, php-gd 5.1.4-1.el4s1.4, php-dba 5.1.4-1.el4s1.4, php-pdo 5.1.4-1.el4s1.4, php-xml 5.1.4-1.el4s1.4, php-imap 5.1.4-1.el4s1.4, +10 morefixed: vendor fix RHSA-2006:0688
-
Red Hat Desktop version 3 php 4.3.2-36.ent, php-imap 4.3.2-36.ent, php-ldap 4.3.2-36.ent, php-odbc 4.3.2-36.ent, php-mysql 4.3.2-36.ent, php-pgsql 4.3.2-36.ent Red Hat Enterprise Linux AS version 3 php 4.3.2-36.ent, php-imap 4.3.2-36.ent, php-ldap 4.3.2-36.ent, php-odbc 4.3.2-36.ent, php-mysql 4.3.2-36.ent, php-pgsql 4.3.2-36.ent Red Hat Enterprise Linux AS version 4 php 4.3.9-3.18, php-gd 4.3.9-3.18, php-imap 4.3.9-3.18, php-ldap 4.3.9-3.18, php-odbc 4.3.9-3.18, php-pear 4.3.9-3.18, +7 more Red Hat Enterprise Linux Desktop version 4 php 4.3.9-3.18, php-gd 4.3.9-3.18, php-imap 4.3.9-3.18, php-ldap 4.3.9-3.18, php-odbc 4.3.9-3.18, php-pear 4.3.9-3.18, +7 morefixed: vendor fix RHSA-2006:0669
-
Red Hat Enterprise Linux ES version 2.1fixed: vendor fix RHSA-2006:0682
-
Red Hat Enterprise Linux ES version 3 php 4.3.2-36.ent, php-imap 4.3.2-36.ent, php-ldap 4.3.2-36.ent, php-odbc 4.3.2-36.ent, php-mysql 4.3.2-36.ent, php-pgsql 4.3.2-36.ent Red Hat Enterprise Linux ES version 4 php 4.3.9-3.18, php-gd 4.3.9-3.18, php-imap 4.3.9-3.18, php-ldap 4.3.9-3.18, php-odbc 4.3.9-3.18, php-pear 4.3.9-3.18, +7 morefixed: vendor fix RHSA-2006:0669
-
Red Hat Enterprise Linux WS version 2.1fixed: vendor fix RHSA-2006:0682
-
Red Hat Enterprise Linux WS version 3 php 4.3.2-36.ent, php-imap 4.3.2-36.ent, php-ldap 4.3.2-36.ent, php-odbc 4.3.2-36.ent, php-mysql 4.3.2-36.ent, php-pgsql 4.3.2-36.ent Red Hat Enterprise Linux WS version 4 php 4.3.9-3.18, php-gd 4.3.9-3.18, php-imap 4.3.9-3.18, php-ldap 4.3.9-3.18, php-odbc 4.3.9-3.18, php-pear 4.3.9-3.18, +7 morefixed: vendor fix RHSA-2006:0669
-
Red Hat Linux Advanced Workstation 2.1fixed: vendor fix RHSA-2006:0682
-
Red Hat Stronghold 4.0 for Red Hat Enterprise Linux AS (version 2.1)fixed: vendor fix RHSA-2006:0736
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Timeline
- Published
- First public exploit (EDB-2193)
Exploit prediction
2.01% chance of exploitation in the next 30 days, higher than 81% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- EDB-2193 PHP 4.4.3/5.1.4 - 'sscanf' Local Buffer Overflow local, 2006-08-16
- bugs.php.net http://bugs.php.net/bug.php?id=38322 referenced PoC, tagged "exploit" by a source, unverified
- securityfocus.com http://www.securityfocus.com/archive/1/442438/30/0/threaded referenced PoC, tagged "exploit" by a source, unverified
- plain-text.info http://www.plain-text.info/sscanf_bug.txt referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 2.0 | 4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
Classification
- Technology feeds
References
-
bugs.php.net
/bug.php?id=38322
exploit, patch
-
securityfocus.com
/archive/1/442438/30/0/threaded
mailing-list, exploit, patch, vendor-advisory
-
plain-text.info
/sscanf_bug.txt
exploit, url-repurposed
-
redhat.com
/support/errata/RHSA-2006-0669.html
vendor-advisory
-
mandriva.com
/security/advisories?name=MDKSA-2006:144
vendor-advisory
-
novell.com
/linux/security/advisories/2006_20_sr.html
vendor-advisory
-
ubuntu.com
/usn/usn-342-1
vendor-advisory
-
rhn.redhat.com
/errata/RHSA-2006-0688.html
vendor-advisory
-
novell.com
/linux/security/advisories/2006_19_sr.html
vendor-advisory
-
redhat.com
/support/errata/RHSA-2006-0682.html
vendor-advisory
-
novell.com
/linux/security/advisories/2006_22_sr.html
vendor-advisory
-
security.gentoo.org
/glsa/glsa-200608-28.xml
vendor-advisory
-
rhn.redhat.com
/errata/RHSA-2006-0736.html
vendor-advisory
-
novell.com
/linux/security/advisories/2006_52_php.html
vendor-advisory
-
securitytracker.com
/id?1016984
vdb-entry
- php.net /release_5_1_5.php
-
securityfocus.com
/bid/19415
vdb-entry
-
secunia.com
/advisories/21768
third-party-advisory
-
secunia.com
/advisories/21403
third-party-advisory
-
oval.cisecurity.org
/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11062
vdb-entry, signature
-
secunia.com
/advisories/21847
third-party-advisory
-
secunia.com
/advisories/22487
third-party-advisory
- support.avaya.com /elmodocs2/security/ASA-2006-221.htm
-
secunia.com
/advisories/22039
third-party-advisory
-
secunia.com
/advisories/21683
third-party-advisory
-
secunia.com
/advisories/23247
third-party-advisory
-
secunia.com
/advisories/21467
third-party-advisory
-
secunia.com
/advisories/22004
third-party-advisory
- support.avaya.com /elmodocs2/security/ASA-2006-222.htm
-
secunia.com
/advisories/22538
third-party-advisory
-
secunia.com
/advisories/21546
third-party-advisory
-
secunia.com
/advisories/21608
third-party-advisory
-
secunia.com
/advisories/22440
third-party-advisory
-
secunia.com
/advisories/22069
third-party-advisory
- support.avaya.com /elmodocs2/security/ASA-2006-223.htm
-
vupen.com
/english/advisories/2006/3193
vdb-entry
- php.net /ChangeLog-5.php#5.1.5
-
securityreason.com
/securityalert/1341
third-party-advisory
Sources
- CVE List CVE-2006-4020
- NVD CVE-2006-4020
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.