⚡Megatron LLM Hub
←Back to search
Website

PHP 核心两处内存安全漏洞 PHP2Shell 可远程利用,已实测复现

PHP 位于大量 Web 服务入口,漏洞编号连着 CISA 通告,未打补丁即暴露。
rcephpcvepoc
Oct 24, 2026 Live Exploitation for PHP2Shell (CVE-2026-109618, CVE-2026-109619): SafeBreach Coverage for the CISA PHP Alert Learn how PHP2Shell works, which PHP versions are affected, and how SafeBreach goes beyond finding vulnerable web servers by running a live PHP2Shell exploit to test whether your patches and security controls stop the attack. Summary Two critical PHP flaws: PHP2Shell is the name for CVE-2026-109618 and CVE-2026-109619. These are memory-safety vulnerabilities in PHP’s core request handling, and they let an unauthenticated attacker run code as the web worker account. Both are rated 9.2 (Critical) under CVSS v4.0. CISA urges immediate patching: On October 21, 2026, CISA urged organizations to update to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35. PHP 8.1 and older receive no fixes from the PHP project. A version check alone can’t tell you if you’re exploitable: The flaws are present in every unpatched PHP installation serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. Whether an attacker can exploit them depends on the server setup and PHP configuration. The PHP project has confirmed remote code execution on Apache with mod_php, where the exploit fires before any application code runs. Successful exploits are quiet, so controls must be tested, not assumed: CrowdStrike found that a successful PHP2Shell exploit returns a normal HTTP 200 response and leaves application logs clean. Detection has to focus on what follows, like PHP workers spawning shells. SafeBreach coverage validates PHP2Shell with a live exploit: SafeBreach now runs a working PHP2Shell exploit, validated and integrated by SafeBreach Labs, to test whether patches actually closed the flaw and whether endpoint and network controls detect and stop exploitation. To the best of our knowledge, it is the first live PHP2Shell exploitation simulation from a CTEM platform. A second simulation identifies web servers running an affected PHP release. Author: Noam Sagiv, Product Manager On October 21, 2026, the Cybersecurity and Infrastructure Security Agency (CISA) released an alert titled “Critical Vulnerabilities in PHP Require Immediate Patching” . The alert warns that CVE-2026-109618 and CVE-2026-109619 allow unauthenticated remote code execution and affect all PHP installations serving web requests. It also urges organizations to update to PHP 8.5.12, 8.4.27, 8.3.36, or 8.2.35 immediately. CISA also advises organizations that cannot update right away, or that still run PHP 8.1 or earlier, to take PHP-based systems offline until they are patched or updated. The alert follows the PHP project’s own security advisory , published alongside the fixed releases, which rates the risk highest for Apache with mod_php. Cyber agencies in Australia , Canada , and the United Kingdom issued parallel warnings. What is PHP2Shell? PHP2Shell is the name for two critical vulnerabilities in PHP’s core request handling, CVE-2026-109618 and CVE-2026-109619, disclosed on October 21, 2026. Both can let an unauthenticated attacker execute code on a vulnerable PHP web server with crafted HTTP requests, and both are rated 9.2 (Critical) under CVSS v4.0. The CVE records credit researchers at Calif, OpenAI, and Wiz with finding and reporting them. The name is not the PHP project’s own, but it describes the outcome accurately: a crafted HTTP request becomes a shell on the web server. What sets PHP2Shell apart is where it sits. Most web attacks depend on a flaw in the application—a vulnerable plugin, an unsafe upload handler. PHP2Shell sits beneath all of that, in the runtime that parses each request. On the mod_php path that the PHP project has demonstrated, a fully patched application offers no protection because the vulnerable code runs first. VirusTotal fingerprints roughly 5.1 million internet-facing IP addresses running PHP, and PHP is often embedded inside other software, where it may not appear in an asset inventory at all. The PHP project announced on October 20 that fixes would ship the next day and released them on October 21 at 14:00 UTC. Details had already leaked through a now-deleted forum post, including claims that the flaws scored 10.0; PHP rates both 9.2. Is PHP2Shell being exploited? Reporting on in-the-wild activity is still developing, and the sources do not yet agree: CISA had not observed exploitation as of the alert’s publication. Amazon Threat Intelligence reported exploitation attempts against its honeypots beginning October 17, four days before the patches shipped. Amazon reported broad exploitation attempts that appeared to come from multiple actors, while noting it was unclear whether the attempts would have succeeded against real-world systems. The PHP security team said proof-of-concept exploits published before the patches were not functional. As of October 22, Dataminr reported activity limited to scanning, fingerprinting, and non-working exploits, with no known compromises. Cloudflare had seen millions of PHP2Shell exploit attempts by October 22, according to The Hacker News , including failed attempts to install a variant of the Mirai botnet. Several security firms, including SOCRadar and Wordfence, still report no successful compromises. CrowdStrike developed a working exploit during internal testing, which it has not released, and confirmed that a single anonymous POST request can cause an Apache mod_php worker to launch a shell. SafeBreach Labs has also developed a working PHP2Shell exploit, which powers the live exploitation simulation described in the SafeBreach coverage section below. Amazon’s guidance is the right frame: defenders should not assume the public disclosure date is the earliest date of exploitation. How does CVE-2026-109618 work? PHP uses longjmp() to abandon a request when it runs out of memory. According to the CVE record, some code paths do not account for this and leave request memory uninitialized before performing an allocation. The request cleanup routine then reads or branches on that memory, and multiple out-of-memory strategies can consistently turn the condition into remote code execution. The attack completes within a single request, and CrowdStrike’s analysis places the vulnerable parsing in PHP’s handling of request input, before extensions or scripts run. Configuration matters here. CrowdStrike reports that the URL-encoded path it demonstrated requires PHP’s memory_limit to be lower than roughly four times post_max_size, which PHP’s defaults (128M and 8M) do not meet. The larger upload limits common on sites that accept files—64M against a 128M memory limit, for example—do, and they can be set per directory or per virtual host. How does CVE-2026-109619 work? PHP keeps some global state that temporarily points into per-request memory. In certain scenarios that state is not correctly reset when the request ends, so it continues to reference memory that has already been freed. A later request handled by the same worker can read that stale state before initialization resets it, and the CVE record notes multiple strategies that turn this into remote code execution (RCE). Exploitation takes two steps: one request poisons the worker, and a second triggers the flaw. The PHP project’s confirmed paths run through session upload progress tracking and, on PHP 8.5, fatal error backtraces, though PHP notes these are not the only variants. Long-lived workers, such as Apache with mod_php, carry the most exposure. Which systems are affected by PHP2Shell? The PHP project says the flaws affect all PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. Being affected doesn’t mean every installation is exploitable. The PHP project has confirmed remote code execution on Apache with mod_php and assesses PHP-FPM, FrankenPHP, and LiteSpeed as likely or possibly susceptible. Configuration matters too: the path CrowdStrike demonstrated doesn’t work under PHP’s default memory settings. Patching is still the only complete fix, because PHP notes that other exploitation variants exist. Fixed releases are available for every supported branch: PHP 8.5: fixed in 8.5.12 PHP 8.4: fixed in 8.4.27 PHP 8.3: fixed in 8.3.36 PHP 8.2: fixed in 8.2.35 (this branch reaches end of life on December 31, 2026) PHP 8.1 and older no longer receive updates from the PHP project, and CrowdStrike reports that the vulnerable code is present across the PHP 7.x and 8.x series. Of the roughly 1.1 million internet-facing IP addresses that disclose their PHP version, VirusTotal counts about 758,000 on end-of-life branches (5.4 through 8.1) and about 272,000 on supported branches. The PHP security team has published minimal source backports for PHP 7.4, 8.0, and 8.1, and some Linux distributions and long-term support vendors provide patched packages for older branches. PHP2Shell TTPs The CISA alert does not map PHP2Shell to MITRE ATT&CK, so the activity below is described by stage rather than by technique ID. Reconnaissance Activity observed since disclosure has been dominated by scanning and fingerprinting, as actors identify internet-facing servers and the PHP versions they run. A server that advertises its PHP version in a response header answers that question for them. Initial Access The attacker sends crafted HTTP requests to an internet-facing PHP server. No authentication, session, or vulnerable application code is required. On the mod_php path the PHP project has demonstrated, the flaw triggers while PHP is still processing the request, before any application code runs. Execution Successful exploitation yields code execution with the privileges of the web worker account. CrowdStrike demonstrated an Apache mod_php worker launching a shell process from a single anonymous POST request, and CISA advises organizations to monitor for PHP worker processes launching shells or downloading tools. Defense Evasion A successful PHP2Shell exploit is quiet. CrowdStrike reports that the worker process does not crash, the server returns a standard HTTP 200 response, and application logs record nothing unusual. The only server-side trace it observed was a PHP memory-limit fatal error ending in “in Unknown on line 0.” CrowdStrike notes that a failed attempt is absorbed by a worker respawn that monitoring treats as routine, so bursts of respawns are worth a closer look. What Follows Initial Access No public reporting yet describes post-exploitation activity from a successful PHP2Shell intrusion. A shell running as the web worker is a foothold, not an endpoint, and defenders should plan for standard web-tier tradecraft: web shells written into the document root, command execution from the web server process, tool downloads, outbound connections to attacker infrastructure, and theft of database credentials and API keys stored in files the web user can read. PHP2Shell IOCs The CISA alert does not publish IOCs, and no authoritative list of malicious hashes, domains, or IP addresses has been released. Amazon reported that exploitation attempts came from commercial anonymization infrastructure, but did not publish the addresses. Detection therefore rests on behavior and logs: the memory-limit fatal error described above (which also appears in benign failures, so it warrants investigation rather than a verdict), bursts of worker respawns, the oversized and malformed request shapes PHP’s interim mitigations are designed to limit, and PHP workers spawning shells. Each is covered under Proactive Threat Monitoring below. SafeBreach Coverage & Playbook Attack Updates PHP2Shell is a vulnerability in a runtime rather than a malware family, so coverage has three jobs: finding PHP servers running an affected release, confirming that patches actually closed the flaw, and validating that endpoint and network controls detect and stop exploitation. To address all three, SafeBreach has added the following new coverage: #11841—Reconnaissance of PHP releases affected by PHP2Shell CVE-2026-109618 CVE-2026-109619. Reads the PHP version a server exposes, compares it with the first fixed release for its branch, and reports whether the server is vulnerable, patched, end-of-life, or unknown. It runs safely, using only the version information the server already exposes. NOTE: This is an Advanced Action and should be scheduled accordingly. #11842—Remote code execution through the PHP session upload progress vulnerability php2shell CVE-2026-109618 CVE-2026-109619. Runs a working PHP2Shell remote code execution exploit, developed by SafeBreach Labs, against PHP servers. It tests both whether a server’s patch is effective and whether endpoint and network security controls detect and stop exploitation as it happens. NOTE: This is an Advanced Action that may disrupt the target service, so run it only against servers you are authorized to test and schedule it accordingly. How to Assess Your Exposure & Test Your Defenses Against PHP2Shell with SafeBreach SafeBreach customers can now assess their PHP2Shell exposure, verify their patches, and validate endpoint and network controls against a live PHP2Shell exploit in multiple ways. Method 1 – SafeBreach Scenarios: Navigate to the SafeBreach Scenarios page and choose PHP2Shell (CVE-2026-109618, CVE-2026-109612). Method 2 – Attack Playbook: From the Attack Playbook, filter by the threat name PHP2Shell (CVE-2026-109618, CVE-2026-109612) or search for the attack ID listed above. Method 3 — Known Threats Series: Open the Known Threats Series report, select the PHP2Shell (CVE-2026-109618, CVE-2026-109612) report, and run the simulations. Additional Advisory Steps Mitigation Strategies Update PHP immediately to 8.5.12, 8.4.27, 8.3.36, or 8.2.35, prioritizing internet-facing systems, as CISA advises. Restart every PHP worker, or use a reload that replaces both the binary and every worker, and confirm the version serving each site rather than the command-line version. Inventory every PHP runtime , including PHP bundled inside content management systems, appliances, and third-party applications, where it may not appear in standard asset lists—a visibility gap CISA calls out in its alert. Resolve unsupported branches. PHP 8.1 and older receive no fixes from the PHP project. Obtain backported packages from your Linux distribution or long-term support vendor, or upgrade to a supported branch. CISA advises taking systems offline that cannot be patched or updated. Treat interim measures as a stopgap only. The PHP project stresses that its interim settings, such as lowering post_max_size, disabling session.upload_progress.enabled, and enforcing request size limits at the web server or proxy, reduce exposure to specific attack paths but do not make an installation safe. See the PHP advisory for the full list and its caveats. Use WAF protection as a bridge, not a fix. CISA notes that a web application firewall may provide some protection until systems are patched. It does not substitute for updating. Check patched systems for prior compromise. Given reports of attempts before disclosure, look for new or modified .php files in web roots and for unexpected cron jobs, processes, user accounts, and outbound connections. If anything looks wrong, rotate every secret the web user could read. Proactive Threat Monitoring Alert on web server processes spawning children: php-fpm, php-cgi, Apache or httpd with mod_php, lsphp, and frankenphp should rarely launch shells, interpreters, or network tools. Hunt PHP error logs for memory-limit fatal errors ending “in Unknown on line 0,” and correlate them with the requests that preceded them. Watch for bursts of worker respawns in PHP-FPM and Apache logs, which can indicate failed exploitation attempts. Flag anomalous request shapes: oversized or deeply nested POST bodies, very high field or multipart part counts, requests without a usable Content-Length, and session upload progress fields on endpoints that do not use sessions. Log outbound connections from the web server user and alert on any destination without a business reason. Stay Ahead with SafeBreach Patching closes the two flaws, but only if the patch is applied everywhere and works as expected. SafeBreach customers can run both new PHP2Shell simulations today to find servers still running an affected release, then use a working exploit to confirm patches are effective and that endpoint and network controls would detect and stop an attack on any server that’s still exposed—connect with your Customer Success rep for help. Not a customer yet? Schedule a demo to see how the SafeBreach CTEM Platform turns breaking threats into measurable risk reduction. About the Author Noam Sagiv is a Product Manager at SafeBreach leading attack content for the SafeBreach CTEM Platform. Before SafeBreach, she spent five years in Israel’s Unit 8200, where she led teams building data-driven intelligence products used by more than 10,000 users. Frequently Asked Questions What is PHP2Shell? PHP2Shell is the name for CVE-2026-109618 and CVE-2026-109619, two critical memory-safety vulnerabilities in PHP’s core request handling disclosed on October 21, 2026. Both can let an unauthenticated attacker execute code on a vulnerable PHP web server with crafted HTTP requests. Researchers at Calif, OpenAI, and Wiz are credited with finding them. What does the CISA alert on PHP2Shell recommend? The Cybersecurity and Infrastructure Security Agency (CISA) alert “Critical Vulnerabilities in PHP Require Immediate Patching,” published October 21, 2026, directs organizations to update PHP to 8.5.12, 8.4.27, 8.3.36, or 8.2.35 immediately. For systems that can’t be updated right away, or that run PHP 8.1 or earlier, CISA advises taking them offline until they’re patched. It also recommends monitoring for PHP worker processes that launch shells or download tools. What are CVE-2026-109618 and CVE-2026-109619? CVE-2026-109618 and CVE-2026-109619 are memory-safety vulnerabilities in PHP’s core request handling, each rated 9.2 (Critical) under CVSS v4.0. CVE-2026-109618 abuses out-of-memory handling that leaves request memory uninitialized, and CVE-2026-109619 abuses global state that outlives the request memory it points to. Which systems are affected by PHP2Shell? CVE-2026-109618 and CVE-2026-109619 both affect PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP, and LiteSpeed. The PHP project rates Apache with mod_php the highest risk. It has confirmed remote code execution on that setup, and exploitability on other setups depends on configuration. Is PHP2Shell being exploited in the wild? PHP2Shell exploitation reporting is still developing. Amazon Threat Intelligence reported exploitation attempts against its honeypots beginning October 17, 2026, four days before patches shipped, but said it was unclear whether those attempts would have succeeded. The PHP security team said proof-of-concept exploits published before the patches were not functional, and Dataminr reported no known compromises as of October 22. CrowdStrike has built a working PHP2Shell exploit in internal testing but has not released it. Has PHP2Shell been patched? Yes. The PHP project released fixes for PHP2Shell on October 21, 2026, in PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35. PHP 8.1 and older no longer receive updates from the PHP project, so organizations on those branches must obtain backported packages from a Linux distribution or long-term support vendor, build from PHP’s minimal source backports for 7.4, 8.0, and 8.1, or upgrade. PHP’s interim configuration changes reduce exposure but do not fully protect an unpatched system. How can organizations test their exposure to PHP2Shell? Start by confirming the PHP version actually serving each site, not the command-line version, and comparing it with the first fixed release for its branch. Then validate that controls detect exploitation and what follows it. Customers of the SafeBreach CTEM Platform can run two PHP2Shell simulations: one identifies web servers running an affected PHP release, and the other uses a working RCE exploit to test whether patches are effective and whether endpoint and network controls detect and stop exploitation. You Might Also Be Interested In Research Blog SafeBreach Coverage for #ProxyNotShell Vulnerabilities CVE-2022-41040 & CVE-2022-41082 Read More Solution Brief SafeBreach CTEM Platform Read More Research Blog SafeBreach Labs Releases Root Cause Analysis & Proof-of-Concept Exploit for CVE-2026-24061: Telnetd RCE as Root Vulnerability Read More Get the latest research and news