High severity

PHP patches 18 flaws, seven critical, including session bug phpAfterShell

PHP's four-weekly release fixes seven critical remote code execution bugs, one of them a session flaw found by an AI-assisted research team, a month after PHP2Shell attacks began.

By Mr Elite Published 7 min read

Severity
High
Status
Reported by outlets
Sources
3
Last checked

The short version

  • PHP released 8.6.0, 8.5.13, 8.4.28, 8.3.37 and 8.2.36 on 19 November 2026; Infosecurity Magazine counts 18 fixed flaws, seven critical.
  • phpAfterShell, CVE-2026-126714, abuses PHP's default file-based session storage and needs a suitable gadget chain in the application to reach code execution.
  • Depthfirst found it using AI frontier models tuned for cybersecurity tasks, Infosecurity Magazine reported.
  • PHP2Shell, patched in October, is now widely exploited, SecurityWeek reported. Exploitation of the new flaws has not been reported in the coverage so far.

What happened

PHP released its regular four-week security update on Thursday 19 November 2026. Infosecurity Magazine reported that the PHP Foundation fixed 18 vulnerabilities, seven of them marked critical. SecurityWeek counted seven critical flaws plus 10 of high and medium severity, so the two outlets differ on the total.

One of the critical bugs has been named phpAfterShell and is tracked as CVE-2026-126714. Infosecurity Magazine reported that the security firm Depthfirst discovered it using AI frontier models tuned for cybersecurity tasks. The Hacker News said the flaw lets an attacker make PHP's default session storage hand back objects the attacker chose, by cutting off a session write at the right moment.

SecurityWeek described the mechanism. Attackers who can influence session contents and interrupt the write of serialised data to a session file may trigger deserialisation of attacker-controlled content when the session is next opened. Code execution then depends on a suitable gadget chain in the application.

The other critical entries are mostly use-after-free bugs, where code uses memory after it has been released. They include CVE-2026-129481, CVE-2026-129474, CVE-2026-129182 and CVE-2026-129496. Two more are CVE-2026-115560, a session upload progress flaw disclosed on 23 October, and CVE-2026-129289, a request-smuggling bug in PHP-FPM, the process manager many sites use to run PHP.

Infosecurity Magazine said the new flaws affect all supported PHP versions but need non-default configuration or uncommon setups to be exploited. PHP 8.6.0 and 8.5.13 fix all the critical bugs. SecurityWeek reported that most fixes also reached 8.4.28, 8.3.37 and 8.2.36.

Why it happened

For phpAfterShell, the reporting describes the chain as follows. PHP stores sessions as files by default (session.save_handler = files). If an attacker can interrupt the write of serialised session data, PHP may later read attacker-controlled content back as objects when the session is opened.

On its own that is not code execution. The Hacker News said it needs a second weakness, such as a gadget chain in the application. The Hacker News text available does not give the severity rating for CVE-2026-126714, and Infosecurity Magazine did not give a CVSS score for it.

The outlets differ on one detail. SecurityWeek ties the session upload progress feature to CVE-2026-115560, with a mismatch between two session serialisation formats. Infosecurity Magazine describes phpAfterShell as involving a session manipulated during a file upload. Whether the two bugs share a trigger has not been spelled out.

How this kind of failure works

Serialisation turns an object in memory into text or bytes so it can be stored, such as in a session file. Deserialisation rebuilds the object. The danger is that rebuilding can run code inside the application, because some classes do work automatically when they are created or destroyed.

A gadget chain is a sequence of such classes, already present in the application or its libraries, that an attacker can link together so that the automatic work adds up to something harmful. The attacker does not upload new code. They steer code that is already there.

Picture a coat-check desk. You hand over a ticket and staff fetch whatever the ticket says. If a stranger can scribble on the ticket stub while it is being written, the staff may fetch an item the stranger chose, and if that item is a key to the back office, the desk has handed out access.

That is why the session file matters. Sessions are meant to hold data the server wrote itself. When an attacker can influence that data and the server trusts it on the way back in, the application has effectively accepted instructions from outside.

Who is affected

Infosecurity Magazine said all supported PHP versions are affected by the new set of flaws, though exploitation needs non-default or uncommon setups. SecurityWeek noted that CVE-2026-129481 does not affect PHP 8.2, and that CVE-2026-129474 affects PHP 8.5 and later. Patched builds are 8.6.0, 8.5.13, 8.4.28, 8.3.37 and 8.2.36.

To check your exposure, run php -v on your servers and compare the version with those numbers. Then see whether your sites use the default file-based session handler and whether the application, or a library it loads, includes classes that could serve as a gadget chain. Hosting providers and managed platforms may patch for you, so check their notices.

Infosecurity Magazine said successful exploitation could allow a remote attacker access to sensitive information, including login credentials and customer records, modify session data, spy on visitors or disrupt the service. The coverage does not report exploitation of the November flaws. It does report that PHP2Shell, fixed in October, is being exploited, so unpatched servers are already a target.

How to defend against it

Tick each step as you check it. Your progress is saved on this device.

What to learn from this

The concept: Insecure deserialisation and gadget chains

Deserialisation flaws come from trusting stored data. The bug is rarely a single line that runs code. It is a path that lets outside data reach a place where the application treats it as its own.

The same pattern appears in Java object streams, Python pickle files, and cookies that carry serialised user state. In each case, data that crosses a boundary and returns later should be verified, signed or restricted to plain data formats.

Treat any data an outsider can influence as untrusted, even when it comes back from your own storage.

Quick check

Sign in to earn 10 XP for a right answer

Why does phpAfterShell by itself not guarantee code execution?

Timeline

  1. October 2026 PHP fixes the two PHP2Shell flaws, CVE-2026-109618 and CVE-2026-109619, with emergency releases.
  2. 23 October 2026 PHP discloses CVE-2026-115560 in session upload progress, two days after the emergency fixes, Infosecurity Magazine reported.
  3. 30 October 2026 Check Point says campaigns exploiting PHP2Shell against its gateways date back to this day, Infosecurity Magazine reported.
  4. 19 November 2026 PHP releases 8.6.0, 8.5.13, 8.4.28, 8.3.37 and 8.2.36, fixing 18 flaws including seven critical.

What is not known yet

  • Whether any of the November flaws, including phpAfterShell, is being exploited in the wild; none of the coverage reports it.
  • The severity score for CVE-2026-126714, which is not given in the reporting.
  • How the session upload progress flaw (CVE-2026-115560) and phpAfterShell relate to each other.
  • The exact total of fixed flaws, since SecurityWeek and Infosecurity Magazine give different counts.

Questions people ask

What is phpAfterShell?

It is the name given to CVE-2026-126714, a flaw in PHP's default file-based session storage. By cutting off a session write at the right moment, an attacker can make PHP return objects they chose. With a suitable gadget chain in the app, that can lead to code execution.

Which PHP versions fix it?

PHP 8.6.0 and 8.5.13 fix all the critical bugs, SecurityWeek reported. Most of the patches are also in 8.4.28, 8.3.37 and 8.2.36. Some flaws do not affect every branch, so check the advisory for your version.

Who found phpAfterShell?

Infosecurity Magazine reported that the security firm Depthfirst discovered it using AI frontier models tuned for cybersecurity tasks. PHP has patched it as part of its regular four-week release cycle.

Is phpAfterShell being exploited?

None of the coverage reports exploitation of it so far. The earlier PHP2Shell flaws, fixed in October, are widely exploited, according to SecurityWeek, so patching quickly remains sensible.

Sources

Know someone who should see this?

Keep reading