PHP2Shell
Two critical vulnerabilities in the PHP engine itself allowed unauthenticated attackers to execute arbitrary code on servers by triggering memory corruption during request parsing. Attackers could run commands before any application code executed, potentially leading to data theft and full server compromise.
medium.com
Published on medium.com
An executive briefing on the PHP2Shell vulnerabilities (CVE-2026–109618 & CVE-2026–109619)
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's error handling uses a longjmp() that skips cleanup, leaving memory in an inconsistent state that can be exploited for code execution.
Impact
An attacker could execute arbitrary code on the server, potentially leading to data theft and full compromise, though a WAF or other controls may block some attempts.
What the attacker needed
Internet-facing PHP server; No authentication required; Vulnerable PHP version
The fix
The vulnerabilities were fixed by updating PHP to versions 8.5.12, 8.4.27, 8.3.36, and 8.2.35.
How it was found
- Send a request engineered to trigger an out-of-memory condition at a precise moment.
- PHP aborts via longjmp() and skips cleanup, leaving half-finished data.
- For CVE-2026-109618, the final cleanup step executes the attacker-shaped data.
- For CVE-2026-109619, the freed memory is reclaimed on the next request by the same worker.
- The attacker sends a second request to trigger execution of the poisoned memory.
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 that powers many websites. These bugs were in the PHP engine itself, not in any website's code. An attacker could send a specially crafted request to a PHP server and make it run their own commands, without needing a password or account.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.