Skip to content
RCE Write-up Advanced

PHP2Shell (CVE-2026-109618 and CVE-2026-109619): Detecting unauthenticated remote code execution in PHP core

PHP core contained four memory-safety bugs that allowed an unauthenticated attacker to run code or leak memory via HTTP requests. The bugs stemmed from stale pointers after out-of-memory errors, enabling remote code execution and disclosure of secrets from other requests.

webflow.sysdig.com

Published on webflow.sysdig.com

Sysdig Threat Research Team

The author, on webflow.sysdig.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely PHP does not clear global pointers into the request heap after a fatal out-of-memory error, so later requests use stale pointers into freed memory.

Impact

An unauthenticated attacker could run code as the web-server user and leak secrets from other requests; exploitation was confirmed in the wild, and the bugs affect all internet-facing PHP servers on vulnerable versions.

What the attacker needed

Internet-facing PHP server; vulnerable PHP version; no authentication needed

The fix

The vulnerabilities were fixed in PHP 8.2.35, 8.3.36, 8.4.27, and 8.5.12, and interim mitigations are available for unpatched systems.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

PHP is a programming language used by many websites. These bugs let anyone who can send a web request to a PHP server run their own commands on it, without needing a password. The server also could leak private data from other users' requests.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.