CVE-2006-4812 in Php
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).
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Php | Php | 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5+24 more4.0.6 4.0.7 4.1.0 4.1.1 4.1.2 4.2 4.2.0 4.2.1 4.2.2 4.2.3 5.0 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official 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).
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2006-4812 |
|---|---|
| BreachSpider ID | BS-2006-GLOBAL-161203-C |
| CVSS vector | AV:N/AC:L/Au:N/C:C/I:C/A:C |
| Published | 2006-10-10 |
| Last modified | 2026-06-16 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-94: Code Injection
Attacker injects arbitrary code that is executed by the application process.
Related attack patterns (CAPEC)
CAPEC-35 Leverage Executable Code in Non-Executable Files via CWE-94
CAPEC-77 Manipulating User-Controlled Variables via CWE-94
CAPEC-242 Code Injection via CWE-94
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
An integer overflow vulnerability in PHP versions up to 5.1.6 and 4 before 4.3.0 can be exploited by remote attackers to execute arbitrary code through the unserialize function.
The vulnerability occurs when the unserialize function is called with a large value for the number of array elements, leading to an integer overflow in the Zend Engine's ecalloc function. This can allow an attacker to execute arbitrary code on the server.
Questions
What is CVE-2006-4812?
An integer overflow vulnerability in PHP versions up to 5.1.6 and 4 before 4.3.0 can be exploited by remote attackers to execute arbitrary code through the unserialize function.
What is the CVSS score for CVE-2006-4812?
CVE-2006-4812 has CVSS 10.0 (Critical). Vector: AV:N/AC:L/Au:N/C:C/I:C/A:C. EPSS: 20.7%.
Is CVE-2006-4812 actively exploited?
Public exploit available for CVE-2006-4812. Exploitation risk elevated.
How do I remediate CVE-2006-4812?
Priority: IMMEDIATE. PSIRT: [email protected]
What systems are affected by CVE-2006-4812?
CVE-2006-4812 affects Php Php.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Php","product":"Php","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-16.