CVE-2006-4020
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…
Check your servers for CVE-2006-4020
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2006-4020 affects a package, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Exploitation
EPSS 2.01%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 81.5% of all scored CVEs. Scores of 30 Nov 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
n/a
n/a
|
affected all versions
|
Is my server affected?
Find the installed version of the package (replace PACKAGE with its name) and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i PACKAGE
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2006-4020 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2006-4020RHEL, Rocky, Alma, Fedora
rpm -q PACKAGE
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2006-4020Alpine
apk list --installed | grep -i PACKAGEWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2006-4020
trivy image --scanners vuln IMAGE | grep CVE-2006-4020
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
38 of 39 references. The list leaves out addresses that are not web links and those after the first 300; all of them are in the record on cve.org.
Advisories
- http://www.php.net/release_5_1_5.php php.net
- 21768 secunia.com · third party advisory
- 21403 secunia.com · third party advisory
- RHSA-2006:0669 redhat.com · vendor advisory
- MDKSA-2006:144 mandriva.com · vendor advisory
- 21847 secunia.com · third party advisory
- SUSE-SR:2006:020 novell.com · vendor advisory
- 22487 secunia.com · third party advisory
- USN-342-1 ubuntu.com · vendor advisory
- http://support.avaya.com/elmodocs2/security/ASA-2006-221.htm support.avaya.com
- 22039 secunia.com · third party advisory
- RHSA-2006:0688 rhn.redhat.com · vendor advisory
20 more
- http://bugs.php.net/bug.php?id=38322 bugs.php.net
- 21683 secunia.com · third party advisory
- 23247 secunia.com · third party advisory
- 21467 secunia.com · third party advisory
- SUSE-SR:2006:019 novell.com · vendor advisory
- 22004 secunia.com · third party advisory
- http://support.avaya.com/elmodocs2/security/ASA-2006-222.htm support.avaya.com
- 22538 secunia.com · third party advisory
- RHSA-2006:0682 redhat.com · vendor advisory
- 21546 secunia.com · third party advisory
- 21608 secunia.com · third party advisory
- 22440 secunia.com · third party advisory
- 22069 secunia.com · third party advisory
- http://support.avaya.com/elmodocs2/security/ASA-2006-223.htm support.avaya.com
- SUSE-SR:2006:022 novell.com · vendor advisory
- http://www.php.net/ChangeLog-5.php#5.1.5 php.net
- GLSA-200608-28 security.gentoo.org · vendor advisory
- 1341 securityreason.com · third party advisory
- RHSA-2006:0736 rhn.redhat.com · vendor advisory
- SUSE-SA:2006:052 novell.com · vendor advisory
Other references
- 1016984 securitytracker.com · vdb entry
- http://www.plain-text.info/sscanf_bug.txt plain-text.info
- 19415 securityfocus.com · vdb entry
- oval:org.mitre.oval:def:11062 oval.cisecurity.org · vdb entry, signature
- 20060804 php local buffer underflow could lead to arbitary code execution securityfocus.com · mailing list
- ADV-2006-3193 vupen.com · vdb entry
Source: the record CVE-2006-4020 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse