PHP Critical Remote Code Execution Vulnerabilities
PHP Critical Remote Code Execution Vulnerabilities
Summary
On 2026-10-21 the PHP project released PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 to fix two critical vulnerabilities that can allow unauthenticated remote code execution (RCE). CVE-2026-109618 is an RCE via out-of-memory (OOM) corruption and CVE-2026-109619 is an RCE via stale global state. Both are rated CVSS 4.0 9.2 (Critical) by the PHP security team. The PHP project states that only an update is a complete solution and that its configuration mitigations only reduce exposure to specific attack paths and should only be done if immediate upgrades are not possible. The vendor reports a demonstrated exploit against mod_php, and exploitation in the wild has been reported by watchTowr and confirmed by Check Point Research against its gateways (see the Check Point update below).
Affected Systems and/or Applications
- PHP versions earlier than 8.2.35, 8.3.36, 8.4.27 and 8.5.12 on their respective branches.
- All PHP installations serving web requests, including PHP-FPM, Apache with mod_php, php-cgi, FrankenPHP and LiteSpeed. The vendor considers the risk highest for mod_php.
- PHP 8.1 and older no longer receive updates from the PHP project; some distributions and LTS vendors provide backported fixes. The project published minimal source backports for PHP 7.4, 8.0 and 8.1. The vendor does not list these branches as affected in the GHSAs; the existence of the backports indicates they carry the issue.
- A report that every PHP version from PHP 5 onward is affected is not confirmed by a vendor source. Exposure of PHP 5.x and 7.0 to 7.3 is unknown.
Update 2: Impact on Check Point Products
Check Point has published an advisory and a research report on active exploitation of PHP2Shell against its Security Gateways with the Mobile Access portal. Check Point reports that only a couple of dozen unpatched systems in a single region were compromised. Its PHP2Shell fix has been available since 2026-10-23 and is included in the November Jumbo Hotfix, which Check Point recommends installing on all Management Servers and Security Gateways.
- Check Point describes two waves of activity:
- First wave, starting 2026-10-30: targeted Israeli organizations. The portal's Apache/PHP workers logged hundreds of segmentation faults, and session files containing the
upload_progress_pwnmarker appeared under/opt/CPcvpn-R81.20/tmp/. - Second wave, starting 2026-11-02: broader, spanning multiple countries and sectors. No destructive activity was reported.
- First wave, starting 2026-10-30: targeted Israeli organizations. The portal's Apache/PHP workers logged hundreds of segmentation faults, and session files containing the
- Across both waves, attackers used PHP2Shell for initial access and CVE-2026-123039 to escalate to root. In many cases this gave them a network foothold. The research report describes a wiper deployed against a VMware ESXi host after the gateway was compromised.
- Upgrade internet-facing Mobile Access deployments first.
- Indicators of compromise include source addresses 130.94.19[.]204 and 130.94.19[.]168; PHP session files containing
upload_progress_pwn;zz*.tplwebshells in the portal templates directory;/tmp/CPconfigdaemonandslot_CPconfigdaemon;/lib/libcpfwcommon.so; a TCP 11072 listener; andDREAM_ANNEXATION.txtfiles. Check Point notes that the absence of a match does not rule out compromise. File hashes are in the research report. - Check Point attributes the toolset to the PhiliKit framework, which ESET associates with China-nexus UNC5221, but states that attribution remains uncertain.
Update 1: Impact on Palo Alto Networks Products
Palo Alto Networks has released an advisory concerning which of its products and what versions have been affected by CVE-2026-109618 and CVE-2026-109619 after conducting an evaluation of its product portfolio.
No in-the-wild exploitation has been observed by the vendor. Only affected products are listed in the table below; the full table is available in the PAN advisory.
Technical Details
Vulnerability Mechanism
- CVE-2026-109618 (RCE via OOM corruption): PHP uses
longjmp()for out-of-memory errors to abort the current request. If an allocation fails while request memory is only partly initialized, the early exit leaves invalid data that request cleanup can treat as valid. Several multipart parsing behaviors can trigger OOM within normal PHP limits. - CVE-2026-109619 (RCE via stale global state): request-owned global state (error, session, object and extension state) can survive after its backing memory is freed. A later request handled by the same worker may use that stale state before normal initialization resets it, causing a use-after-free; a crafted heap layout can lead to RCE. Fatal errors, including OOM, can skip the cleanup that resets the state. Two consumers are confirmed: INI diagnostics raised before request initialization and session upload progress handling.
Observed Exploitation Path
- The PHP project reports unauthenticated RCE as the web worker account, validated against mod_php with default settings, where an unauthenticated request triggers the attack before any application code runs. The advisory describes a demonstrated exploit; it does not state that exploitation occurred in the wild.
- watchTowr states exploitation was observed in the wild as of 2026-10-21 through its honeypot network. Check Point Research has since confirmed in-the-wild exploitation (see the Check Point update above).
- Check Point Research has published indicators of compromise for its observed campaign (see the Check Point update above). It links the toolset to PhiliKit, which ESET associates with China-nexus UNC5221, but states that attribution remains uncertain.
Key Points
- Impact is unauthenticated RCE in a technology that serves a very large share of web applications.
- No complete workaround exists; updating is the only complete fix.
- Per CrowdStrike they provide out-of-the-box visibility and detection coverage for the post-exploitation activities of the PHP vulnerabilities. Existing IOAs detect and prevent common post-exploitation activity, including web shell deployment, suspicious child processes spawned by PHP or web server processes, and malicious command execution.
- Palo Alto Networks lists Threat Prevention signature 543004 as currently available.
Mitigation
Immediate Actions for Self-Hosted Instances
Limit Exposure
These measures reduce exposure to specific attack paths only and do not make an installation safe.
CVE-2026-109618:
- Set
memory_limit=-1in a way applications cannot override (for examplephp_admin_valuein the FPM pool or Apache configuration) and check that no pool, directory or application setting restores a finite limit. An underlying allocation failure can still reach the vulnerable path. - Set a low
post_max_size(8M if no file uploads are needed, otherwise 32M), keepupload_max_filesizebelow it, and enforce decoded request size, input field count, multipart part count, header count and nesting depth limits at the web server or proxy. Block multipart at the frontend if the application does not use it. - Use a container or cgroup memory limit as an availability boundary, preferably killing only the affected worker. Do not use
RLIMIT_ASorRLIMIT_DATA, which can cause the vulnerable allocation failure.
CVE-2026-109619:
- Set
session.upload_progress.enabled=0inphp.ini, an FPM pool or server configuration that applies before request parsing, and restart every worker. Do not rely onini_set()or.user.ini. This blocks the confirmed session paths but not other variants. - On PHP 8.5, set
fatal_error_backtraces=0and restart every worker. This blocks the confirmed fatal backtrace path only. - Remove invalid or deprecated per-request settings that emit diagnostics before initialization, and fix attacker-reachable fatal errors and execution timeouts. Hiding diagnostics with
error_reporting,display_errorsor@does not help. pm.max_requests=1may be considered if performance allows.
Patch/Upgrade
- Update to PHP 8.5.12, 8.4.27, 8.3.36 or 8.2.35.
- Linux distributions and LTS vendors received the patches in advance; check the vendor for updated packages.
- PHP 8.1 and older: obtain a vendor backport or upgrade to a supported version. Minimal source backports exist for PHP 7.4, 8.0 and 8.1 for those building from source.
- The PHP project urges users of the volunteer-maintained
rpms.remirepo.netto switch to distribution packages or build from source, since that repository will not have updates immediately. - Restart all PHP workers after updating or changing configuration.
What the Cyber Fusion Center Is Doing
The CFC is monitoring the situation and analyzing the case to identify potential threat-hunting campaigns. This advisory will be updated if required.
References
- PHP project, Security advisory: Critical remote code execution vulnerabilities, update now: https://www.php.net/archive/2026.php#2026-10-21-5
- GHSA-w8hw-w9fx-j79w: https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
- GHSA-6wmf-4rv5-p3rp: https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
- NVD CVE-2026-109618: https://nvd.nist.gov/vuln/detail/CVE-2026-109618
- NVD CVE-2026-109619: https://nvd.nist.gov/vuln/detail/CVE-2026-109619
- watchTowr, Frequently Asked Questions About PHP Remote Code Execution: https://watchtowr.com/intelligence/php-cve-2026-109618-faq/
- CVE-2026-109618 Impact of Critical Vulnerabilities in PHP (CVE-2026-109618, CVE-2026-109619) on Palo Alto Networks Products: https://security.paloaltonetworks.com/CVE-2026-109618
- Check Point, Security Advisory: Active Exploitation of PHP2Shell and Local Privilege Escalation (2026-11-12): https://blog.checkpoint.com/security/security-advisory-active-exploitation-of-php2shell-and-local-privilege-escalation/
- Check Point Research, PHP2Shell Exploitation on Check Point Gateway: https://research.checkpoint.com/2026/php2shell-exploitation-on-check-point-gateway/
- Check Point SK1000302 (PHP2Shell): https://support.checkpoint.com/results/sk/sk1000302
- Check Point SK1000362 (CVE-2026-123039): https://support.checkpoint.com/results/sk/sk1000362





.avif)






.webp)