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…
- 4.6MediumCVSS base score
- 2.0%Exploitation in 30 daysEPSS · top 19% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 1Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list an Exploit-DB entry for it.
Show the exploits1
Exploit-DB1 entry
- PHP 4.4.3/5.1.4 - 'sscanf' Local Buffer Overflow (Exploit-DB entry) (opens in a new tab)
EDB-ID 2193local, linuxpublished 16 Aug 2006Verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By redhat
Published
- 18 years later
· 18 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 2.0 | Medium4.6 | AV:L/AC:L/Au:N/C:P/I:P/A:P |
- EPSS (exploitation in 30 days)
- 2.0% · top 19% of all CVEs (11 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.6.
Affected products
n/a
- affected n/a
References
References38
- 1016984 (opens in a new tab)vdb-entryx_refsource_SECTRACKx_transferred
- http://www.plain-text.info/sscanf_bug.txt (opens in a new tab)x_refsource_MISCx_transferred
- http://www.php.net/release_5_1_5.php (opens in a new tab)x_refsource_CONFIRMx_transferred
- 19415 (opens in a new tab)vdb-entryx_refsource_BIDx_transferred
- 21768 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 21403 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- RHSA-2006:0669 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- MDKSA-2006:144 (opens in a new tab)vendor-advisoryx_refsource_MANDRIVAx_transferred
- oval:org.mitre.oval:def:11062 (opens in a new tab)vdb-entrysignaturex_refsource_OVALx_transferred
- 21847 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- SUSE-SR:2006:020 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- 22487 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- USN-342-1 (opens in a new tab)vendor-advisoryx_refsource_UBUNTUx_transferred
- http://support.avaya.com/elmodocs2/security/ASA-2006-221.htm (opens in a new tab)x_refsource_CONFIRMx_transferred
- 22039 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- RHSA-2006:0688 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- http://bugs.php.net/bug.php?id=38322 (opens in a new tab)x_refsource_CONFIRMx_transferred
- 21683 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 23247 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 21467 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- SUSE-SR:2006:019 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- 22004 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- http://support.avaya.com/elmodocs2/security/ASA-2006-222.htm (opens in a new tab)x_refsource_CONFIRMx_transferred
- 22538 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- RHSA-2006:0682 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- 21546 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 21608 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 22440 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 22069 (opens in a new tab)third-party-advisoryx_refsource_SECUNIAx_transferred
- 20060804 php local buffer underflow could lead to arbitary code execution (opens in a new tab)mailing-listx_refsource_BUGTRAQx_transferred
- http://support.avaya.com/elmodocs2/security/ASA-2006-223.htm (opens in a new tab)x_refsource_CONFIRMx_transferred
- SUSE-SR:2006:022 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- ADV-2006-3193 (opens in a new tab)vdb-entryx_refsource_VUPENx_transferred
- http://www.php.net/ChangeLog-5.php#5.1.5 (opens in a new tab)x_refsource_CONFIRMx_transferred
- GLSA-200608-28 (opens in a new tab)vendor-advisoryx_refsource_GENTOOx_transferred
- 1341 (opens in a new tab)third-party-advisoryx_refsource_SREASONx_transferred
- RHSA-2006:0736 (opens in a new tab)vendor-advisoryx_refsource_REDHATx_transferred
- SUSE-SA:2006:052 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2006-4013 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2006-4020)Record last updated .