CVE-2015-6835: PHP Session Deserializer Use-After-Free
- Vendor
- PHP Group
CVE-2015-6835 is a use-after-free vulnerability in PHP's session deserialization logic affecting PHP before 5.4.45, 5.5.x before 5.5.29, and 5.6.x before 5.6.13. The flaw is triggered when the session deserializer performs multiple php_var_unserialize calls and mishandles object lifetime, allowing freed memory to be reused while still referenced. In practice, crafted session content can cause PHP to deserialize truncated or malformed serialized data into unintended objects, creating a path to memory corruption. In exploit chains documented at the time, the bug was particularly relevant when session data was stored outside PHP's standard session storage, such as in MySQL-backed session stores, where truncation of serialized session data could transform attacker-controlled input into a dangerous deserialization state. Successful exploitation can lead to arbitrary code execution or application crashes.
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.
Successful exploitation can result in arbitrary code execution in the context of the PHP process or denial of service through process crashes caused by use-after-free memory corruption. Where the vulnerable deserialization path can be influenced remotely through attacker-controlled session content, the flaw can be used as the memory-corruption component of a broader exploit chain to achieve full compromise of the web application environment.
Mitigation
If you can’t patch tonight, do this now.
Avoid storing raw serialized PHP session data in backends that can alter, truncate, or otherwise transform the serialized byte stream before it is deserialized. If a database-backed session store is required, encode session data in a form that preserves byte integrity before storage. Prefer PHP's standard session storage where feasible, as it was noted as not being affected in the same way in the documented exploit context. As a defense-in-depth measure in MySQL-backed deployments, enable strict SQL modes such as STRICT_TRANS_TABLES or STRICT_ALL_TABLES to prevent silent truncation that can help create exploitable malformed session data.
Remediation
Patch, then assume compromise.
Upgrade PHP to a fixed release: 5.4.45 or later, 5.5.29 or later, 5.6.13 or later, or a newer unaffected branch such as 7.0.0 or later. Systems using distribution-packaged PHP should apply the vendor-provided security update that includes the fix for CVE-2015-6835. Where the vulnerability is part of an application-specific exploit chain, update the affected application components as well.
Exploits
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
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.
References
Frequently asked questions
- Is CVE-2015-6835 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2015-6835 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2015-6835?
- As of Oct 16, 2026, Mallory has not confirmed a public exploit for CVE-2015-6835. 1 candidate exploit record is not yet analyzed.
- Is there a patch for CVE-2015-6835?
- Upgrade PHP to a fixed release: 5.4.45 or later, 5.5.29 or later, 5.6.13 or later, or a newer unaffected branch such as 7.0.0 or later. Systems using distribution-packaged PHP should apply the vendor-provided security update that includes the fix for CVE-2015-6835.
- What products are affected by CVE-2015-6835?
- PHP Group Php.
- How severe is CVE-2015-6835?
- CVE-2015-6835 has a CVSS v3 score of 9.8 (Critical) and an EPSS score of 36.2% (99th percentile) as of Oct 16, 2026.
Recent activity
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.