CVE-2007-1581 in Php
The resource system in PHP 5.0.0 through 5.2.1 allows context-dependent attackers to execute arbitrary code by interrupting the hash_update_file function via a userspace (1) error or (2) stream handler, which can then be used to destroy and modify internal resources. NOTE: it was later reported that PHP 5.2 through...
Affects 1 product from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Php | Php | 5.0 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4+25 more5.0.5 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.2.10 5.2.11 5.2.12 5.2.13 5.3.0 5.3.1 5.3.2 |
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.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official description
The resource system in PHP 5.0.0 through 5.2.1 allows context-dependent attackers to execute arbitrary code by interrupting the hash_update_file function via a userspace (1) error or (2) stream handler, which can then be used to destroy and modify internal resources. NOTE: it was later reported that PHP 5.2 through 5.2.13 and 5.3 through 5.3.2 are also affected.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2007-1581 |
|---|---|
| BreachSpider ID | BS-2007-GLOBAL-329551-C |
| CVSS vector | AV:N/AC:M/Au:N/C:C/I:C/A:C |
| Published | 2007-03-21 |
| 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
A vulnerability in PHP versions 5.0.0 through 5.2.13 and 5.3 through 5.3.2 allows attackers to execute arbitrary code by interrupting the hash_update_file function via a userspace error or stream handler, leading to the destruction and modification of internal resources.
The attack involves interrupting the hash_update_file function during its execution, which can be achieved through a userspace error or by using a custom stream handler. This interruption can lead to the execution of arbitrary code, potentially compromising the system.
Questions
What is CVE-2007-1581?
A vulnerability in PHP versions 5.0.0 through 5.2.13 and 5.3 through 5.3.2 allows attackers to execute arbitrary code by interrupting the hash_update_file function via a userspace error or stream handler, leading to the destruction and modification of internal resources.
What is the CVSS score for CVE-2007-1581?
CVE-2007-1581 has CVSS 9.3 (Critical). Vector: AV:N/AC:M/Au:N/C:C/I:C/A:C. EPSS: 8.0%.
Is CVE-2007-1581 actively exploited?
Public exploit available for CVE-2007-1581. Exploitation risk elevated.
How do I remediate CVE-2007-1581?
Priority: IMMEDIATE.
What systems are affected by CVE-2007-1581?
CVE-2007-1581 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.