Skip to content
Fencer Vulns
medium 4.6

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 more
    fixed: 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 more
    fixed: vendor fix RHSA-2006:0669
  • Red Hat Enterprise Linux ES version 2.1
    fixed: 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 more
    fixed: vendor fix RHSA-2006:0669
  • Red Hat Enterprise Linux WS version 2.1
    fixed: 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 more
    fixed: vendor fix RHSA-2006:0669
  • Red Hat Linux Advanced Workstation 2.1
    fixed: 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

  1. Published
  2. 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

Sources

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.