Description
Double free vulnerability in the session extension in PHP 5.2.0 and 5.2.1 allows context-dependent attackers to execute arbitrary code via illegal characters in a session identifier, which is rejected by an internal session storage module, which calls the session identifier generator with an improper environment, leading to code execution when the generator is interrupted, as demonstrated by triggering a memory limit violation or certain PHP errors.
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 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 1
- PHP 5.2.0/5.2.1 - Rejected Session ID Double-Free EDB-3480 · local · Mar 14, 2007 · verified
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Advisories 1
- DSA-1283-1 php5 Debian Security (DSA / DLA) · Mar 9, 2026
References
- ADV-2007-0960 vdb-entry
- 25056 third-party-advisory
- 24505 third-party-advisory
- http://www.php-security.org/MOPB/MOPB-23-2007.html
- 22971 vdb-entry
- SUSE-SA:2007:032 vendor-advisory