The Library

phpAfterShell Vulnerability CVE-2026-126714: Critical PHP Session Flaw Can Lead to Remote Code Execution, No Attacks Reported Yet, and the Fixed Versions to Install

PHP has fixed phpAfterShell, CVE-2026-126714, a critical flaw where partially overwritten session files can lead to remote code execution. Here is what is confirmed, which versions are affected and what to upgrade to.

Elite Performance Exclusive LLC 6 min read

Where Worldwide

phpAfterShell Vulnerability CVE-2026-126714: Critical PHP Session Flaw Can Lead to Remote Code Execution, No Attacks Reported Yet, and the Fixed Versions to Install
On this page 8 sections

PHP has a new critical security flaw, nicknamed phpAfterShell and tracked as CVE-2026-126714. Partially overwritten session files can lead to remote code execution, which means an attacker could run their own code on your server. If your website, online store, customer portal or internal tool runs on PHP, the fix is an upgrade to PHP 8.5.13, 8.4.28, 8.3.37, 8.2.36 or 8.6.0, and it should be on this week's list.

We covered the earlier critical PHP flaw in PHP2Shell Vulnerability: What It Is and How to Fix It. phpAfterShell is a separate bug, and security reporting says it is related to PHP2Shell. This post covers what came next: what the new advisory says, which versions are affected and what a business running PHP should do now.

What happened with phpAfterShell

PHP's maintainers published a security advisory on GitHub on Nov 19, 2026. Its title sums up the problem: partially overwritten session files can lead to remote code execution. The advisory rates the issue Critical.

Sessions are how a PHP site remembers a visitor from one page to the next, for example a logged-in customer or a shopping cart. The advisory title says that when a session file is only partly overwritten, the result can be remote code execution.

The flaw is tracked as CVE-2026-126714. SecurityWeek's report on the advisory says it is related to PHP2Shell.

What is confirmed and what is not

Question What the sources say
Is the flaw real and rated? Yes. PHP's own advisory rates it Critical.
CVE number CVE-2026-126714
Affected versions PHP before 8.2.36, 8.3.x before 8.3.37, 8.4.x before 8.4.28, 8.5.x before 8.5.13
Fixed versions 8.6.0, 8.5.13, 8.4.28, 8.3.37, 8.2.36
Is it being exploited? SecurityWeek: "There appear to be no reports of phpAfterShell's in-the-wild exploitation."
Does an attacker need to log in? Not stated in the sources we checked
Severity score (CVSS) Not stated in the sources we checked
Who found it Not stated in the sources we checked

The sources we relied on do not explain exactly what an attacker has to do to trigger the bug, whether specific applications are more exposed than others, or whether the problem came from an incomplete PHP2Shell fix. We are not going to fill those gaps with guesses.

One more point: no reports of attacks is not the same as no attacks. It means nobody has said so publicly yet. A Critical rating plus a public advisory is reason enough to patch now.

Which PHP versions are affected by CVE-2026-126714

The Debian security tracker states: "This issue affects PHP versions before 8.2.36, 8.3.* before 8.3.37, 8.4.* before 8.4.28 and 8.5.* before 8.5.13."

PHP branch Affected Fixed in
8.5 Before 8.5.13 8.5.13
8.4 Before 8.4.28 8.4.28
8.3 Before 8.3.37 8.3.37
Before 8.2.36 Affected 8.2.36

Read literally, "before 8.2.36" covers every older release as well. The sources list no fix for anything older than 8.2.36. If a server runs a version older than 8.2.36, the only route the sources point to is moving to a branch that has a fixed release.

How phpAfterShell relates to PHP2Shell

SecurityWeek says phpAfterShell is related to PHP2Shell, and its write-up links PHP2Shell to the parsing of an unauthenticated multipart request. The sources we checked do not spell out the exact technical link between the two bugs.

What matters in practice: a server patched for PHP2Shell is not automatically safe from phpAfterShell. If your PHP version is older than the fixed versions in the table above, it is still on the affected list, whatever you did for PHP2Shell. We wrote about this kind of gap in Updated Is Not the Same as Patched, and we won't repeat that post here.

Why it matters for a business website or company network

Remote code execution is the most serious kind of web server flaw. If an attacker can run code as your web application, they could read the data it can read, change the pages it serves or use the server to reach other systems on your network.

PHP also turns up in places nobody is watching:

  • An old marketing site or landing page still running on a forgotten server.
  • A staging or test copy of your main site.
  • A WordPress site or plugin, since WordPress runs on PHP (see why WordPress sites get hacked).
  • A vendor-supplied application that ships its own PHP.
  • Shared or managed hosting, where the host, not you, chooses the PHP version.

With each of these, the question is the same one we asked in Who Is Patching the Software That Runs Your Business?: who is responsible for upgrading it, and do they know about this advisory?

What to do this week: phpAfterShell checklist

  1. List every place PHP runs. Include live sites, staging servers, old sites, internal tools and vendor apps.
  2. Check the version. On a server, run php -v. On hosting, look in the control panel. The command-line PHP and the version your web server uses can differ, so check the one actually serving your site.
  3. Compare against the table. Anything below 8.5.13, 8.4.28, 8.3.37 or 8.2.36 on its branch is affected.
  4. Upgrade to the fixed release for your branch. That is 8.5.13, 8.4.28, 8.3.37 or 8.2.36, or 8.6.0 if you are moving up.
  5. If you use operating system packages, ask your distribution or provider which package includes the fix for CVE-2026-126714. Debian tracks this CVE on its security tracker.
  6. If you are on managed hosting, ask your host in writing which PHP version your account runs and when it will be on a fixed release.
  7. If you are on a PHP version older than 8.2.36, plan the move to a branch with a fixed release, and test your application on it first.
  8. After upgrading, confirm the new version and test the features that rely on sessions: logins, carts, checkout and forms.
  9. For vendor apps that bundle PHP, ask the vendor whether their build includes the fix.

phpAfterShell questions people are asking

What is phpAfterShell?

It is the nickname for CVE-2026-126714, a Critical PHP flaw where partially overwritten session files can lead to remote code execution.

Is phpAfterShell being exploited?

As of SecurityWeek's report, there appear to be no reports of attacks in the wild. That could change, so do not wait.

Is phpAfterShell the same as PHP2Shell?

No. It is a separate flaw with its own CVE. SecurityWeek says the two are related.

Which PHP version fixes CVE-2026-126714?

PHP 8.6.0, 8.5.13, 8.4.28, 8.3.37 and 8.2.36.

I patched for PHP2Shell. Am I safe?

Only if your PHP is now at or above the fixed version for your branch listed above. Otherwise you are still affected.

How do I check my PHP version?

Run php -v on the server, or check your hosting control panel. Make sure you check the version your website actually uses.

What if I am on an older PHP version?

The affected range covers everything before 8.2.36, and the sources list no fix for older branches. Plan a move to a branch that has a fixed release.

Does phpAfterShell affect WordPress sites?

The advisory is about PHP itself, not any one application. Any site running an affected PHP version is on the list, and that includes WordPress sites.

The bigger lesson

Patching one flaw doesn't end the job. phpAfterShell comes after PHP2Shell, and the businesses that close it fastest are the ones that already know where PHP runs and who is responsible for upgrading it. Keep that list current and the next advisory becomes a routine task instead of an emergency.

For help finding every PHP install and keeping it patched, see security hardening or request a quote.

Get security alerts like this by email, along with our free checklist, at security alerts.

Sources: PHP security advisory GHSA-fm2m-fjf5-v3cp; Debian security tracker: CVE-2026-126714; SecurityWeek.

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.