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.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| RHEL 3 | php +6 | 4.3.2-11.1.ent | RHSA-2004:392 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PHP 4.3.7/5.0.0RC3 - 'memory_limit' Remote Overflow EDB-660 · remote · Nov 27, 2004 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 3
- RHSA-2004:392 Red Hat Security Advisory: php security update Red Hat Security Advisories (RHSA) · Jun 29, 2026
- DSA-531 php4 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-669-1 php3 - several Debian Security (DSA / DLA) · Mar 9, 2026
References
- 2004-0039 vendor-advisory
- 20040714 Advisory 11/2004: PHP memory_limit remote vulnerability mailing-list
- CLA-2004:847 vendor-advisory
- 20040714 TSSA-2004-013 - php mailing-list
- DSA-669 vendor-advisory
- RHSA-2004:395 vendor-advisory
- RHSA-2004:405 vendor-advisory
- oval:org.mitre.oval:def:10896 vdb-entry signature
- RHSA-2004:392 vendor-advisory
- DSA-531 vendor-advisory
- SUSE-SA:2004:021 vendor-advisory
- MDKSA-2004:068 vendor-advisory
- RHSA-2005:816 vendor-advisory
- SSRT4777 vendor-advisory
- php-memorylimit-code-execution(16693) vdb-entry
- 20040722 [OpenPKG-SA-2004.034] OpenPKG Security Advisory (php) mailing-list
- 10725 vdb-entry
- 20040713 Advisory 11/2004: PHP memory_limit remote vulnerability mailing-list
- GLSA-200407-13 vendor-advisory