phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution
AI Image

phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution

The Hacker News • • business

Key Points:

  • A critical PHP vulnerability named phpAfterShell (CVE-2026-126714) allows attackers to inject chosen objects into session data by interrupting session file writes, potentially enabling remote code execution when combined with suitable gadget chains in applications.
  • The flaw affects PHP versions prior to 8.2.36, 8.3.37, 8.4.28, and 8.5.13, with PHP 8.6.0 released including the fix; servers updated only with the October 21 PHP2Shell patches remain vulnerable until they install the latest releases.
  • The vulnerability exploits PHP's default file-based session handler, particularly when the upload progress feature is enabled, allowing attackers to manipulate session data during file uploads before application code runs.
  • Mitigation involves updating to fixed PHP versions, disabling the upload progress feature if immediate updates are not possible, and considering moving sessions to alternative storage that handles writes atomically; however, disabling upload progress is only a partial fix.
  • The attack works by causing an interrupted session write that merges old and new serialized data, tricking PHP into loading attacker-controlled objects on subsequent requests; while no attacks have been reported, the flaw is rated 9.2/10 in severity.

Trending Business

Trending Technology

Trending Health