phpAfterShell Explained: How Hackers Could Turn a PHP Session Flaw Into Code Execution
Hackers could exploit a PHP session flaw to run code on servers, a vulnerability fixed in today's releases.
Overview
A security flaw called phpAfterShell lets attackers turn a weakness in PHPA widely used server-side scripting language that builds dynamic web pages before sending them to browsers sessionAn active logged-in period of communication between a user or device and a server storage into code executionA flaw that lets an attacker run any commands or program they choose on the target machine on a serverA computer or program on a network that stores data and responds to requests from client devices. The issue happens when a session write is cut off at the right moment, allowing an attacker to insert chosen objects that trigger a second weakness in the application. This creates a serious risk for any organization using the default file-based session storage because it allows unauthorized code to run. The flaw is tracked as CVEThe public tracking code assigned to a specific known security flaw in software or hardware-2026-126714 and rated 9.2 out of 10 on the CVSS 4.0The standard rating scale used to score how severe a software security flaw is scale by PHP's maintainersThe developer or small team responsible for reviewing changes and publishing releases for an open-source project. Servers that updated for the PHP2Shell flaws on October 21 are still affected until they install the new releases. PHP 8.6.0 includes the fix, while PHP 8.1 and older are end-of-lifeThe date after which a vendor stops shipping security updates or fixes for an older product version and require moving to a supported branch.
Terms in this story
- PHP
- A widely used server-side scripting language that builds dynamic web pages before sending them to browsers. Because millions of websites and content management systems run on PHP, a newly discovered vulnerability in the PHP engine can put a huge portion of the web at risk.
- Session
- An active logged-in period of communication between a user or device and a server. Once you log in to a website, the server tracks your session so you can click from page to page without retyping your password on every screen.
- Code Execution
- A flaw that lets an attacker run any commands or program they choose on the target machine. When an advisory warns that a bug allows arbitrary code execution, an attacker who triggers the flaw can install malware, read files, or take over the program's account.
- server
- A computer or program on a network that stores data and responds to requests from client devices. Online stores, email systems, and multiplayer games all run on servers in data centers or the cloud, making unpatched servers a primary target for intruders.
- CVE
- The public tracking code assigned to a specific known security flaw in software or hardware. Every cataloged software flaw gets a unique CVE label so security teams, vendors, and news reports can talk about the exact same bug without confusion. Security+ objective 2.3 lists the term
- CVSS 4.0
- The standard rating scale used to score how severe a software security flaw is. Security advisories include a CVSS rating from low to critical based on how easy a bug is to exploit and how much damage it allows. Security+ objective 4.3 lists the term
- maintainers
- The developer or small team responsible for reviewing changes and publishing releases for an open-source project. Supply chain attackers often target a volunteer maintainer with phishing emails or offers to help, hoping to gain publishing rights over a popular code library.
- end-of-life
- The date after which a vendor stops shipping security updates or fixes for an older product version. When a router or server operating system reaches end-of-life, any new vulnerability discovered in it remains unpatched forever, making those devices prime targets for botnets. Security+ objective 2.3 lists the term
- Hackers
- A person who explores and manipulates computer systems, either as a criminal intruder or a security researcher. In news headlines, the word hacker usually means an unauthorized intruder, though the security community also uses it for researchers who find and fix flaws.
- gadget chain
- A sequence of existing code snippets in a program that an attacker links together to run commands. In insecure deserialization and memory exploits, the attacker does not need to upload new code if they can trigger a gadget chain made from libraries already loaded in memory.
- security advisory
- An official bulletin from a vendor or agency warning users about a flaw and its fix. When a bug is patched, the vendor publishes a security advisory listing affected versions, the CVE code, the severity rating, and instructions for updating.
- database
- An organized digital store of structured records, such as customer accounts, orders, or messages, queried by software. Behind almost every website and mobile app sits a database, and attackers target misconfigured or unpatched databases to copy millions of user records at once.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the The Hacker News website. Cite the article, not this page.
Read the full article on The Hacker News (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Vulnerability and patch
"...todays php releases fix the flaw..." Found by reading the article; these exact words are in it - Who is affected: "Servers updated then remain affected..." Organizations using the product
Copied word for word from the article - Security+ 2.3 Explain various types of vulnerabilities.
"......How Hackers Could Turn a PHP Session Flaw Into Code Execution..." Found in the headline
How a story is connected to the course, and every objective, week and job role
Same story at other outlets
- PHP security updates fix 18 flaws, including critical RCE bugs
- PHP2Shell aftershock: 18 more PHP flaws put enterprise web admins on alert
- New phpAfterShell Attack Lets Hackers Achieve Remote Code Execution on PHP Servers
- phpAfterShell (CVE-2026-126714) Slips Past PHP2Shell Patch
- Drupal Fixes Critical RCE Flaw That Could Let Unauthenticated Hackers Take Over Websites
- Critical PHP Flaws Allow Code Execution, But Don't Panic 'PHP2Shell'-Style
- phpAfterShell: How PHP’s Session Writer Became an Unauthenticated RCE
- New phpAfterShell Attack Bypasses PHP2Shell Fix to Enable Remote Code Execution
- PHP security updates fix 18 flaws, including critical RCE bugs
- PHP Releases Patches to Fix 18 Vulnerabilities
- PHP Fixes 7 Critical Flaws, Including Bugs That Could Allow Remote Code Execution
- PHP Warns of Critical Security Flaws Affecting All Supported Versions, Urges Users to Update
- Drupal Patches Critical Installer Flaw That Could Give Unauthenticated Attackers Control of Sites
- Drupal patches critical RCE flaw, warns exploits may surface quickly
- PHP Warns of Critical Flaws Ahead of November Security Release
- PHP Security Release 19 November 2026: Critical Flaws in All Supported Versions and the CVE-2026-115560 Fix
- PHP Warns of Critical Security Vulnerabilities, Urges Users to Prepare for Emergency Updates
- PHP Warns of Critical Security Flaws Affecting All Supported Versions, Fixes Coming November 19
- PHP Security Team Warns of Critical Vulnerabilities, Urges Users to Prepare for November 19 Updates
- PHP schedules a critical security release for 19 November, including CVE-2026-115560
- PHP2Shell flaw exploited in chained attacks targeting unpatched Check Point gateways
- The firewall becomes the foothold: Attackers turn Check Point gateways against customers
- Check Point gateways hacked via PHP2Shell to deploy VMware ESXi wiper
- Unpatched Check Point Gateways Are Being Wiped exploiting PHP2Shell
- Hackers Exploit Check Point PHP2Shell Flaws to Gain Root Access and Deploy Wiper Malware
- Hackers Exploit PHP2Shell Flaws in Check Point Gateways to Deploy TSGA Backdoor and Wipe ESXi Files
- Hackers Exploit Check Point Firewall Flaws to Gain Root Access and Deploy Wiper Malware on VMware ESXi
- PHP2Shell Exploitation on Check Point Gateway