AI Security

PHP2Shell Explained: Low Level on Two PHP Memory Flaws

Low Level's "php situation is insane" explains why this is more serious than a vulnerable WordPress plugin: the flaws are in PHP's web-serving runtime. On 21 October 2026, the PHP security team announced two critical fixes for unauthenticated remote-code-execution paths. Low Level focuses on the memory-lifecycle mistake and the unusual way AI assisted the investigation. This article follows that technical story while separating the video's speculation from the published advisories.

The short answer

CVE-2026-109618 concerns out-of-memory corruption during partially initialized request data. CVE-2026-109619 concerns stale global state that can survive into a later request. PHP lists 8.5.12, 8.4.27, 8.3.36 and 8.2.35 as fixed releases; supported vendor backports may have different package numbers. If you operate a PHP site, verify and update the web-serving runtime now. A vulnerable site is not automatically a confirmed breach.

Watch Low Level's Breakdown

Low Level supplies the walkthrough and simplified memory analogy. For the technical record, use the PHP release notice and Calif Research write-up. The time-linked chapter list follows the supplied transcript.

Two Flaws, One Failure Pattern

The common shape is publish state, do fallible work, then finish or roll it back. If PHP aborts between those steps, later cleanup or a later request may trust state that was never safely completed. That description is a synthesis of Calif's research, not an instruction for reproducing the attack.

Out-of-memory corruption

CVE-2026-109618 advisory

What goes wrong

An out-of-memory failure can interrupt native code after request data appears live but before it is fully initialized.

Why it matters

Cleanup can treat invalid internal data as valid. The PHP team describes demonstrated pre-application-code exploitation on Apache mod_php.

Stale global state

CVE-2026-109619 advisory

What goes wrong

A failed request can free its own memory while a worker-level reference to it remains.

Why it matters

Another request on the same worker may touch that stale reference before normal initialization resets it: a cross-request use-after-free.

This sits underneath application frameworks. Calif and Wiz demonstrated impact on several PHP-backed applications, including WordPress, Drupal and Joomla test environments. That shows broad potential exposure; it does not show that every deployment of those products has been compromised. The PHP team lists PHP-FPM, mod_php, php-cgi, FrankenPHP and LiteSpeed among web-serving installations at risk, with the highest demonstrated risk for mod_php.

How Stale Memory Crosses Requests

Low Level's central example is session upload progress. PHP can inspect multipart form data and initialize session-related state before the site's PHP script executes. Under an interrupted request, normal shutdown may not clear every worker-held reference. The request's memory is then freed. If the worker stays alive, that reference can point at memory it no longer owns. A later request handled by that worker can encounter the stale state before it is reset. That is the timing problem behind use-after-free; the official advisory describes the producer and later consumer as distinct conditions.

At 06:14, Low Level uses two differently shaped data structures to make the idea visible. It is a teaching analogy, not the literal layout of the PHP exploit. Turning stale memory into reliable code execution requires much more than simply retaining a pointer. The important defensive lesson is that request cleanup and worker reuse are part of a runtime's security boundary, even when the application never calls the affected feature directly.

The 2004 Timeline Needs a Correction

The video says PHP 5.4.0 arrived in 2004 and therefore this exact bug sat for 22 years. Those dates are conflated. Calif's research timeline starts with an earlier, related PHP memory-limit vulnerability found by Stefan Esser in 2004. Calif says the earliest affected path it identified for the current findings dates to PHP 5.4.0; the PHP release archive dates that version to 1 March 2012. A 2020 bug report and 2024 audit supplied further clues. The historical pattern is old, but the evidence does not establish that this precise 2026 vulnerability has existed unchanged since 2004.

What AI Contributed to Discovery

Calif researcher Ryan Austin describes beginning with a hypothesis grounded in earlier PHP vulnerabilities, then using an LLM to inspect memory-limit and cleanup paths. After one finding, the team wrote a reusable SKILL.md expressing the failure pattern: state becomes visible, a fallible operation aborts, and a later consumer trusts what remains. That helped surface a related session-state path. OpenAI describes its role in the coordinated project; Wiz reports independent discovery and validation of both issues. PHP maintainers coordinated the fixes.

Low Level contrasts this reasoning with fuzzing. His point is that a multi-stage, cross-request state failure can be hard for a coverage-guided fuzzer to reach. It would be too strong to say fuzzers cannot find use-after-free bugs: sanitizers and stateful fuzzing can find them. The distinctive part here is the human-led search for a specific invariant, with an LLM used to inspect related code paths and researchers validating the result. AI helped the work; it did not replace technical judgment or coordinated disclosure.

Patch Status, Without Turning Rumor Into Guidance

At 08:18, the video mentions social posts claiming an AddressSanitizer result might mean the PHP 8.5.12 patch is incomplete. Low Level calls the information uncertain. We could not establish from that claim alone that the released fix fails for either CVE; a sanitizer error also needs a reproducible path and maintainer analysis to identify what it means. As checked on 23 October 2026, the PHP security notice still names the four releases above as fixes. Watch that notice and your vendor's security channel for follow-ups, but do not delay the available update while a separate report is investigated.

For operators: inventory the PHP build that serves actual web traffic, apply the upstream fix or a vendor-confirmed backport, restart the serving workers, and verify the active build. A local php -v may report a different CLI installation. The PHP team says configuration changes are only partial mitigations and only updating is a complete solution. For the operational checklist, see our companion PHP patch guide. A vulnerability warrants urgent action; confirming compromise of a particular site requires separate investigation.

Video Chapters

TimeTopic
00:00The critical PHP vulnerability
01:26Impact and scope
03:19Explaining the failure path
06:14Visualizing use-after-free
07:30Creator and community interlude
08:18Patch status and AI use
09:46Why stateful bugs are hard to find
12:02Other security headlines

Sources and Limits

Video: Low Level's episode and the reader-provided transcript. Primary technical sources: PHP's October security notice, the advisories for CVE-2026-109618 and CVE-2026-109619, Calif's research and chronology, Wiz's independent validation, and OpenAI's disclosure account. Checked 23 October 2026. This post explains the failure pattern without an exploit procedure and does not assess any individual installation's compromise status.

Common questions

Is every PHP website compromised?
No. The PHP team disclosed two critical vulnerabilities in web-serving PHP installations. Affected does not mean breached; confirming an intrusion requires evidence from the particular system.
Which releases contain the PHP2Shell fixes?
The PHP project lists 8.5.12, 8.4.27, 8.3.36 and 8.2.35. Distribution and hosting vendors can supply backported patches with different package version numbers. Verify the web-serving build, not only the CLI version.
Was the vulnerability present for 22 years?
The researcher traces a related memory-limit vulnerability to 2004. The earliest affected path identified for these 2026 findings dates to PHP 5.4.0, released in 2012. Those are not the same discovery date.
Did AI discover the PHP flaws by itself?
No. Calif researchers used LLM-assisted code review guided by an expert hypothesis and a reusable failure-pattern skill. Wiz independently reported both flaws. Human researchers validated impact and PHP maintainers produced the fixes.
Share
X LinkedIn Reddit
Build Yours

Want a system
like this one?

Book a free 30-minute call. We map your situation, identify the highest-impact automation, and figure out if we are a fit.

Book Free 30-min Call