The Library

phpAfterShell: PHP Session Flaw CVE-2026-126714 Can Lead to Remote Code Execution, What Is Confirmed and What to Do This Week

A flaw in PHP's file-based session handler, CVE-2026-126714, can lead to remote code execution when the application has a suitable gadget chain. Here is what is confirmed, what is not known, and how to check your servers this week.

Elite Performance Exclusive LLC 6 min read

Where Worldwide

phpAfterShell: PHP Session Flaw CVE-2026-126714 Can Lead to Remote Code Execution, What Is Confirmed and What to Do This Week
On this page 8 sections

A newly disclosed flaw in PHP's file-based session handler, tracked as CVE-2026-126714, can lead to remote code execution on a web server when the right conditions are present. If your website, customer portal or online store runs on PHP, check the version this week and plan the upgrade. The advisory rates the attack as possible over the network with no login.

The PHP project published the advisory, GHSA-fm2m-fjf5-v3cp, on Nov 19, 2026, and news coverage calls the issue phpAfterShell. This post covers what the primary sources confirm, what they leave open, and what a business should do now.

What is phpAfterShell (CVE-2026-126714)?

The PHP security advisory says PHP's file-based session handler can leave a session file containing parts of two different serialized sessions. In plain terms, PHP saves each visitor's session data to a file on the server. If that file ends up partly overwritten, with pieces of two sessions mixed together, PHP can read back data that was never meant to be there.

The advisory spells out the consequence: "A suitable object gadget chain in the application can turn this into remote code execution." A gadget chain is a set of existing pieces of code in an application that an attacker can string together once they control data PHP unserializes. The PHP bug opens the door. Whether an attacker can get all the way to running commands depends on the code in your application.

The official PHP 8 changelog records the fix as: "Fixed GHSA-fm2m-fjf5-v3cp (Partially overwritten session files can lead to remote code execution). (CVE-2026-126714)"

What is confirmed and what is claimed

Item Status
CVE id CVE-2026-126714 Confirmed in the official PHP 8 changelog
Affected component Confirmed by the advisory: file-based session handler (ext-session)
Affected versions The advisory lists versions earlier than 8.2.36
Severity The advisory gives the CVSS 4.0 vector AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H
Remote code execution Possible when the application has a suitable gadget chain
Attacks in the wild None reported, according to The Hacker News
The name "phpAfterShell" Used in news coverage, not in the advisory text we rely on

The attack works over the network (AV:N) and is low complexity (AC:L), but certain conditions must be in place first (AT:P). It needs no account or privileges (PR:N), and no user has to click anything (UI:N). A successful attack has a high impact on confidentiality, integrity and availability.

On exploitation, The Hacker News reports: "Neither the maintainers nor the company reports any attacks using phpAfterShell." The same explainer includes this line: "The original exploit stopped working, but the underlying problem was still there,". That suggests an earlier fix blocked one exploit without removing the root cause. The primary advisory we checked does not explain this further, so we are not adding detail beyond what it states.

What is not known yet

  • Fixed versions on other branches. The sources we checked list the affected range only as below 8.2.36, with no fixed numbers for other PHP 8 branches.
  • Which applications are exposed. The sources do not say which frameworks or platforms have a suitable gadget chain.
  • Public exploit code. The sources do not say whether working exploit code is public.
  • Exactly which conditions are required. The vector marks attack requirements as present, but the sources we checked do not list them in full.

How to check if your PHP server is affected

  1. Find the PHP version your site actually runs. On a server you control, run php -v. On managed hosting, check the control panel or ask the host.
  2. Compare it to the advisory. If the version is earlier than 8.2.36, the advisory lists it as affected.
  3. On a different branch, open the official PHP 8 ChangeLog and find the release on your branch that lists CVE-2026-126714.
  4. Confirm how sessions are stored. Ask your developer or host whether the application uses PHP's file-based session handler.
  5. Check the upload progress setting. Run php -i | grep session.upload_progress.enabled to see whether it is on.

What to do this week

Task How
Upgrade PHP Move to 8.2.36 or later if the advisory lists your version as affected. On other branches, install the release that lists CVE-2026-126714 in the PHP 8 changelog
Apply the temporary measure If you do not need the feature, disable session.upload_progress.enabled until you can upgrade, as the advisory suggests
Confirm who owns the patch Managed host, your own server team or a software vendor: get a named person and a date
Verify after the change Check the version again and confirm the website is running the upgraded PHP
Ask about the application Have your developer review where the app unserializes data, since the advisory ties code execution to gadget chains

The advisory calls disabling session.upload_progress.enabled a temporary measure until you upgrade. It does not replace the upgrade.

Why this matters for a business website

Session handling sits behind logins, shopping carts and customer portals. If an attacker can run code on the web server, every part of that system is in play. The advisory's vector rates the impact on confidentiality, integrity and availability as high: customer data could be read, the site could be changed, or the service could be taken down.

The harder question is often who applies the fix. On managed hosting, the host may control the PHP version. On your own server, it is your team. With vendor software that ships its own PHP, it may be the vendor. Name that owner before you need them.

phpAfterShell questions people are asking

What is phpAfterShell?

It is the name news coverage uses for CVE-2026-126714. The flaw is in PHP's file-based session handler, which can leave a session file holding parts of two different sessions.

Is CVE-2026-126714 being exploited?

According to The Hacker News, neither the maintainers nor the company report any attacks using phpAfterShell.

Which PHP versions are affected?

The advisory lists versions earlier than 8.2.36. For other branches, check the PHP 8 changelog for the release that lists CVE-2026-126714.

Does disabling session.upload_progress.enabled fix it?

No. The advisory calls it a temporary measure, for use only if you do not need the feature, until you upgrade.

My host manages PHP. Do I need to do anything?

Yes. Ask the host which PHP version your site runs and when they will upgrade it, then check the version yourself.

The bigger lesson

A patch can stop one exploit and still leave the root cause in place. That is why "we updated" is not the end of the job. Check the exact version, compare it to the advisory, and name the person responsible for the next fix before you need them.

Want your PHP servers and websites checked and kept patched? See security hardening or request a quote.

Get security alerts like this by email, plus the free checklist, at security alerts.

Sources: PHP security advisory GHSA-fm2m-fjf5-v3cp; PHP 8 ChangeLog; The Hacker News: phpAfterShell explained.

Share X LinkedIn Facebook

Was this article helpful?

We only keep the note with this article. No name, no email.

Protected by reCAPTCHA - Privacy and Terms.

Have a question about this article?

Ask it here and we will answer you directly by email. Questions are private, never posted.

Protected by reCAPTCHA - Privacy and Terms.

Security alerts by email

Hear about the next one first.

When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.

Protected by reCAPTCHA - Privacy and Terms.

Want a result like this?

Security alerts, breaches and the technology a business runs on: what happened, who it affects and what to do.

Get a Tech Quote

Security alerts by email

The next security hole is already out there. Hear about it from us first.

When attackers start using a flaw in software businesses run on, we email what it is, whether it touches you and what to do that week, with a round-up of our latest security writing. Free, one-click unsubscribe. You get the checklist straight away: 12 things to secure this week.

Protected by reCAPTCHA - Privacy and Terms.