CVE-2004-0594: PHP memory_limit Race Condition Remote Code Execution
- Vendors
- AvayaDebian ProjectHewlett Packard EnterpriseOpenpkgPHP GroupTrustix
CVE-2004-0594 is a remote code-execution vulnerability in PHP 4 through 4.3.7 and PHP 5 through 5.0.0RC3. Under certain conditions, including configurations with register_globals enabled, an attacker can trigger a memory_limit abort while zend_hash_init is executing. The premature abort leaves key data structures incompletely initialized and permits overwriting of a HashTable destructor pointer.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
A remote attacker can achieve arbitrary code execution in the context of the affected PHP process by corrupting the HashTable destructor pointer during incomplete initialization.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, reduce exposure by disabling register_globals where it is enabled and by limiting untrusted remote access to applications running vulnerable PHP versions. Additional hardening should include minimizing attack surface for externally reachable PHP applications and monitoring for abnormal crashes or interpreter instability consistent with memory corruption attempts.
Remediation
Patch, then assume compromise.
Upgrade PHP to a version newer than PHP 4.3.7 and newer than PHP 5.0.0RC3 that fixes the memory_limit handling flaw. Where possible, move to a maintained PHP release line rather than applying only minimal version changes.
Exploits
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
References
Frequently asked questions
- Is CVE-2004-0594 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2004-0594 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2004-0594?
- As of Oct 16, 2026, Mallory has not confirmed a public exploit for CVE-2004-0594. 1 candidate exploit record is not yet analyzed.
- Is there a patch for CVE-2004-0594?
- Upgrade PHP to a version newer than PHP 4.3.7 and newer than PHP 5.0.0RC3 that fixes the memory_limit handling flaw. Where possible, move to a maintained PHP release line rather than applying only minimal version changes.
- What products are affected by CVE-2004-0594?
- PHP Group Php, Avaya Converged Communications Server, Debian Project Debian Linux, Hewlett Packard Enterprise Hp-Ux, Openpkg, and 1 more.
- How severe is CVE-2004-0594?
- CVE-2004-0594 has a CVSS v2 score of 5.1 (Medium) and an EPSS score of 54.9% (99th percentile) as of Oct 16, 2026.
Recent activity
3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.