Cybersecurity news

Jessica Doner

Back to the list

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

The Hacker News,

Hackers could exploit a PHP session flaw to run code on servers, a vulnerability fixed in today's releases.

Vulnerabilities and patches

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.

How a story is connected to the course, and every objective, week and job role

Same story at other outlets

Related