Skip to main content
Mallory
MediumVulnerability

CVE-2004-0594: PHP memory_limit Race Condition Remote Code Execution

Published Jul 16, 2004 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS5.1Medium · v2
EPSS54.9%99th percentile
CISA KEVNoNot listed
In the wildNoneNo exploitation reported
Vendors
AvayaDebian ProjectHewlett Packard EnterpriseOpenpkgPHP GroupTrustix
IdentifiersCVE-2004-0594CWE-367 · Time-of-check Time-of-use (TOCTOU)…

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.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

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.

Public exploits

Exploits

No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
Candidate exploits are awaiting analysis. View them in Mallory.
Exposure surface

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.

VendorProductType
AvayaConverged Communications Serverhardware
Debian ProjectDebian Linuxoperating_system
Hewlett Packard EnterpriseHp-Uxoperating_system
OpenpkgOpenpkgapplication
PHP GroupPhpapplication
TrustixSecure Linuxoperating_system
FAQ

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.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activityCommunity discussion across Reddit, Mastodon, and other social sources.