Description
The shmop functions in PHP before 4.4.5, and before 5.2.1 in the 5.x series, do not verify that their arguments correspond to a shmop resource, which allows context-dependent attackers to read and write arbitrary memory locations via arguments associated with an inappropriate resource, as demonstrated by a GD Image resource.
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 ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 5.0 | php5 | 5.2.0-10+lenny1 | DTSA-39-1 |
| Debian 4.0 | php5 | 5.2.0-8+etch3 | DSA-1283-1 |
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 2
- PHP < 4.4.5/5.2.1 - 'shmop' Local Code Execution EDB-3426 · local · Mar 7, 2007 · verified
- PHP < 4.4.5/5.2.1 - 'shmop' SSL RSA Private-Key Disclosure EDB-3427 · local · Mar 7, 2007 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 2
- DTSA-39-1 php5 - several vulnerabilities Debian Security (DSA / DLA) · Mar 9, 2026
- DSA-1283-1 php5 Debian Security (DSA / DLA) · Mar 9, 2026
References
- 25056 third-party-advisory
- 32781 vdb-entry
- DSA-1283 vendor-advisory
- 24606 third-party-advisory
- GLSA-200703-21 vendor-advisory
- 25062 third-party-advisory
- 3427 exploit
- USN-455-1 vendor-advisory
- 22862 vdb-entry
- 3426 exploit
- 25057 third-party-advisory
- http://www.php-security.org/MOPB/MOPB-15-2007.html
- SUSE-SA:2007:032 vendor-advisory