{
  "id": 20778868,
  "title": "phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution",
  "url": "https://urgent.news/2026/11/19/phpaftershell-explained-how-hackers-could-turn-a-php-session-flaw",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-19T16:59:56.000Z",
  "source": {
    "name": "The Hacker News",
    "slug": "the-hacker-news",
    "url": "https://thehackernews.com/2026/11/phpaftershell-explained-how-hackers.html"
  },
  "original_language": "en",
  "account": "AfterShell is a PHP session flaw that allows attackers to gain code execution on a server. This vulnerability stems from PHP's default file-based session storage, which can be manipulated to return objects chosen by the attacker. The issue is tracked as CVE-2026-126714 and has been rated 9.2 out of 10 on the CVSS 4.0 scale by PHP's maintainers. PHP versions 8.6.0, 8.1 and older, and 8.4.27 to 8.5.13 are affected, as they use the default file-based session handler. These releases were fixed in the PHP October 21 updates, but servers updated after that date remain vulnerable until they install the latest release.\n\nThe flaw arises when a session write is interrupted at the right moment, causing the file to retain both the start of the new data and the end of the old data. Attackers can exploit this by stopping the write process and injecting malicious code, which will be loaded as a serialized object when the session is accessed again. This issue occurs during PHP session handling and is not limited to upload progress features. To mitigate this threat, servers can either update to the latest PHP version or configure PHP to disable the upload progress feature. However, it's essential to note that disabling this feature is not a complete solution, as other methods of storing untrusted data in sessions remain vulnerable.\n\nTo prevent session-related attacks, it is recommended to switch sessions to a store that writes in one step or limit the untrusted data stored in sessions. In some cases, distribution packages may include the fix without changing the PHP version number, so it's crucial to verify the security status of your server. By staying updated and following the recommended security measures, you can help safeguard your PHP applications against AfterShell and similar vulnerabilities.",
  "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",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}