phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution
- About
- Cyber Incident
- Detected
PHP's default file-based session storage can be made to return objects an attacker chose, by cutting off a session write at the right moment. When combined with a second weakness, such as a suitable gadget chain in the app, those objects can allow the attacker to run code on the server. Today's PHP releases fix the flaw, called phpAfterShell. The flaw is tracked as CVE-2026-126714 and rated
Details
Source publication: The Hacker News
Feed URL: https://feeds.feedburner.com/TheHackersNews
Link: https://thehackernews.com/2026/11/phpaftershell-explained-how-hackers.html
Published: 2026-11-19T16:59:56+00:00
Software flaws named here
- CVE-2026-126714: PHP Group PHPSeverity 9.2, critical34% chance of attack in 30 days
Partially overwritten session files can lead to remote code execution
Partially overwritten session files can lead to remote code execution. The files session save handler, which is the default, writes updated session data into the existing session file without first clearing it. If a write is interrupted, the file can contain the beginning of the new session followed by the end of the old one, and bytes of an ordinary string can later be unserialized as objects. An attacker who can influence the session data, for example through session upload progress, and interrupt a write at a suitable point may inject objects, which can lead to code execution when the application contains a suitable gadget chain. Session data can also be corrupted. This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13.
What to do about it
- Find out whether you run the affected product. Check the product names and versions above against what your business uses, including firewalls, routers, plugins and servers your provider manages for you.
- Apply the vendor’s fix, or the workaround. Install the update from the product’s maker. If none exists yet, follow their temporary workaround or take the affected system off the public internet.
- Check for signs it was already used. Look for new admin accounts, unexpected files and unusual outgoing traffic. If the flaw is on the CISA exploited list, assume attackers have already tried it on exposed systems.
Related on Securlabs
Where this came from and what it does not tell you
- Source type
- News feed excerpt. The headline and opening summary from the publisher’s own feed. We do not copy the article.
- First seen by Securlabs
- ; last updated
- Limits
- Our summary is only what the publisher put in its feed. The full story, with quotes and later corrections, is at the source.
View the raw record (JSON)
{
"id": "news_ea8cebf5d32bea67",
"title": "phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution",
"category": "cve",
"severity": "critical",
"status": "active",
"entity": "Cyber Incident",
"country_code": "GLOBAL",
"summary": "PHP's default file-based session storage can be made to return objects an attacker chose, by cutting off a session write at the right moment. When combined with a second weakness, such as a suitable gadget chain in the app, those objects can allow the attacker to run code on the server. Today's PHP releases fix the flaw, called phpAfterShell. The flaw is tracked as CVE-2026-126714 and rated",
"technical_details": "Source publication: The Hacker News\nFeed URL: https://feeds.feedburner.com/TheHackersNews\nLink: https://thehackernews.com/2026/11/phpaftershell-explained-how-hackers.html\nPublished: 2026-11-19T16:59:56+00:00",
"source_name": "The Hacker News",
"source_url": "https://thehackernews.com/2026/11/phpaftershell-explained-how-hackers.html",
"raw_data": "{\"tags\": [], \"author\": \"info@thehackernews.com (The Hacker News)\", \"guid\": \"https://thehackernews.com/2026/11/phpaftershell-explained-how-hackers.html\"}",
"detected_at": "2026-11-19T16:59:56+00:00",
"resolved_at": null,
"updated_at": "2026-11-23T10:09:06.055943+00:00",
"image_url": "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEEFyvreIQgAheXoKRJxLcNgyzFh0rlydmiMfaOBIlmM7zGPc_71mCSG6zWGlpFcRQg59gVUw6NbpmFiNKIcDB3AqVA5eKpjYExWhMu-uBD_W5xu1wiYRtX5MklAgxeuHOBJOI8H9LmaIoXv7IrvFMVHvVhor06lj_ljcIDjIDAPYJ8w01X-BTA51EpOU/s1600/php-after-shell.jpg"
}