← Vulnerability feed

Vulnerability record · CVE-2004-0594 · published 27 July 2004

CVE-2004-0594: PHP memory_limit abort race allows remote code execution

Openpkg · Openpkg

PHP 4.x up to 4.3.7 and 5.x up to 5.0.0RC3 mishandle the memory_limit abort path, allowing a HashTable destructor pointer to be overwritten before key data structures are initialized. When conditions such as register_globals being enabled are met, this race condition lets remote attackers execute arbitrary code. It matters because it turns a resource-limit failure into a code execution primitive on affected PHP deployments.

5.1 CVSS 2.0 Medium EPSS 55% · top 1.0% CWE-367 · TOCTOU race condition
5.1CVSS 2.0 base score
55%EPSS exploitation probability, 30 days
NoNot in CISA KEV
6Affected product versions listed by NVD
38References
16 Jun 2026Last modified by NVD

Description

The memory_limit functionality in PHP 4.x up to 4.3.7, and 5.x up to 5.0.0RC3, under certain conditions such as when register_globals is enabled, allows remote attackers to execute arbitrary code by triggering a memory_limit abort during execution of the zend_hash_init function and overwriting a HashTable destructor pointer before the initialization of key data structures is complete.

AV:N/AC:H/Au:N/C:P/I:P/A:P

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 19 September 2026. Confidence: medium.

high priorityAlthough the CVSS v2 score is medium and access complexity is high, the flaw allows remote code execution and EPSS predicts a high likelihood of exploitation.

What it is

PHP 4.x up to 4.3.7 and 5.x up to 5.0.0RC3 mishandle the memory_limit abort path, allowing a HashTable destructor pointer to be overwritten before key data structures are initialized. When conditions such as register_globals being enabled are met, this race condition lets remote attackers execute arbitrary code. It matters because it turns a resource-limit failure into a code execution primitive on affected PHP deployments.

Impact

An attacker can execute arbitrary code in the context of the PHP process, potentially taking over the web server or application. This can lead to full compromise of the host or data served by it.

Attack surface

The vulnerability is network-reachable (AV:N) and requires no authentication (Au:N), but the CVSS vector rates access complexity as high (AC:H), reflecting the specific conditions and timing needed. No user interaction is indicated.

Exploitation

CVE-2004-0594 is not listed in CISA KEV, but EPSS shows a 30-day probability of 0.54856 (98.975th percentile), indicating high predicted exploitation activity. Reference tags are advisory and VDB entries only, with no public exploit tag supplied.

What to do

  • Upgrade PHP to a version later than 4.3.7 or 5.0.0RC3 that contains the fix.
  • Disable register_globals where possible, since the description identifies it as a condition that enables the flaw.
  • Apply vendor security updates for PHP packages on Debian, Red Hat, Gentoo, Mandrake, Novell/SUSE, Trustix, HP-UX, Avaya, and OpenPKG systems.
  • Restrict network access to PHP application endpoints to trusted clients where feasible.
  • Monitor and tune memory_limit settings to avoid triggering the abort path under attacker-controlled conditions.

Detection

  • Monitor PHP error logs for memory_limit abort messages followed by abnormal process behavior or crashes.
  • Look for unexpected child process creation or outbound connections from the web/PHP server process.
  • Audit PHP configurations for register_globals being enabled on affected versions.
  • Use host-based intrusion detection to flag code execution or memory corruption indicators in PHP processes.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

6 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000847 Broken Link
http://lists.grok.org.uk/pipermail/full-disclosure/2004-July/023908.html Broken LinkURL Repurposed
http://marc.info/?l=bugtraq&m=108981780109154&w=2 Third Party Advisory
http://marc.info/?l=bugtraq&m=108982983426031&w=2 Third Party Advisory
http://marc.info/?l=bugtraq&m=109051444105182&w=2 Third Party Advisory
http://marc.info/?l=bugtraq&m=109181600614477&w=2 Third Party Advisory
http://www.debian.org/security/2004/dsa-531 Broken Link
http://www.debian.org/security/2005/dsa-669 Mailing List
http://www.gentoo.org/security/en/glsa/glsa-200407-13.xml Third Party Advisory
http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2004:068 Broken Link
http://www.novell.com/linux/security/advisories/2004_21_php4.html Broken Link
http://www.redhat.com/support/errata/RHSA-2004-392.html Broken Link
http://www.redhat.com/support/errata/RHSA-2004-395.html Broken Link
http://www.redhat.com/support/errata/RHSA-2004-405.html Broken Link
http://www.redhat.com/support/errata/RHSA-2005-816.html Broken Link
http://www.securityfocus.com/bid/10725 Broken LinkThird Party AdvisoryVDB Entry
http://www.trustix.org/errata/2004/0039/ Broken Link
https://exchange.xforce.ibmcloud.com/vulnerabilities/16693 Third Party AdvisoryVDB Entry
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10896 Broken Link
http://distro.conectiva.com.br/atualizacoes/?id=a&anuncio=000847 Broken Link
http://lists.grok.org.uk/pipermail/full-disclosure/2004-July/023908.html Broken LinkURL Repurposed
http://marc.info/?l=bugtraq&m=108981780109154&w=2 Third Party Advisory
http://marc.info/?l=bugtraq&m=108982983426031&w=2 Third Party Advisory
http://marc.info/?l=bugtraq&m=109051444105182&w=2 Third Party Advisory
http://marc.info/?l=bugtraq&m=109181600614477&w=2 Third Party Advisory
http://www.debian.org/security/2004/dsa-531 Broken Link
http://www.debian.org/security/2005/dsa-669 Mailing List
http://www.gentoo.org/security/en/glsa/glsa-200407-13.xml Third Party Advisory
http://www.mandrakesecure.net/en/advisories/advisory.php?name=MDKSA-2004:068 Broken Link
http://www.novell.com/linux/security/advisories/2004_21_php4.html Broken Link
http://www.redhat.com/support/errata/RHSA-2004-392.html Broken Link
http://www.redhat.com/support/errata/RHSA-2004-395.html Broken Link
http://www.redhat.com/support/errata/RHSA-2004-405.html Broken Link
http://www.redhat.com/support/errata/RHSA-2005-816.html Broken Link
http://www.securityfocus.com/bid/10725 Broken LinkThird Party AdvisoryVDB Entry
http://www.trustix.org/errata/2004/0039/ Broken Link
https://exchange.xforce.ibmcloud.com/vulnerabilities/16693 Third Party AdvisoryVDB Entry
https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A10896 Broken Link

Track CVE-2004-0594 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-32433Erlang/OTP SSH server missing authentication allows remote code executionErlang/OTP SSH servers before OTP-27.3.3, OTP-26.2.5.11 and OTP-25.3.2.20 mishandle SSH protocol messages, letting an unauthenticated attacker execut…KEVEPSS 99%analysed10.0CVE-2025-24201Apple WebKit out-of-bounds write allows sandbox escapeCVE-2025-24201 is an out-of-bounds write in Apple's WebKit that was addressed with improved checks. Maliciously crafted web content may break out of …KEVEPSS 3.8%analysed10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2026-24061GNU Inetutils telnetd argument injection allows remote auth bypasstelnetd in GNU Inetutils through 2.7 fails to sanitize the USER environment variable, so a value such as "-f root" is passed as an argument to login …KEVEPSS 99%analysed9.8CVE-2025-39682Linux kernel TLS zero-length record handling flaw on rx_listThe Linux kernel TLS receive path mishandles zero-length records that arrive from the rx_list, breaking the assumption that a record type change cann…KEVEPSS 2.9%analysed9.8CVE-2025-24813Apache Tomcat Default Servlet path equivalence enables RCE and file disclosureApache Tomcat mishandles path equivalence for names containing an internal dot, letting a remote unauthenticated attacker write files through the Def…KEVEPSS 100%analysed9.8CVE-2024-9680Mozilla Firefox and Thunderbird use-after-free in Animation timelinesA use-after-free flaw in Animation timelines allows an attacker to execute code in the content process of Firefox and Thunderbird. Mozilla reports ex…KEVEPSS 23%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2004-0594), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.