PHP2Shell (CVE-2026-109618 & CVE-2026-109619) enables unauthenticated remote code execution on PHP servers. CISA, ENISA and the PHP Foundation urge immediate patching. Exploitation attempts were observed as early as 17 October — before public disclosure.
A Heartbleed / Log4Shell-scale incident is unfolding in the PHP engine that powers roughly 70% of the web. The flaw is not in your WordPress plugin or Laravel app — it sits in PHP’s own memory management and error handling. Updating plugins or adding a WAF rule is not enough. You must upgrade the PHP runtime.
(both CVEs)
on PHP
use-after-free
patch immediately
What is PHP2Shell?
Discovered by researchers at Wiz, Calif and OpenAI (with AI-assisted analysis), these vulnerabilities stem from memory-safety issues in the PHP core that have existed for more than a decade. An unauthenticated attacker can craft HTTP requests to execute arbitrary code — and in some cases read passwords, tokens and API keys from process memory belonging to other requests.
Risk is highest on Apache with mod_php, where exploitation can be triggered before any application code runs. PHP-FPM, php-cgi, FrankenPHP and LiteSpeed are also affected.
RCE via OOM corruption
If a request hits memory_limit at the wrong moment, partially initialized internal data can be left behind. Cleanup may treat it as valid, corrupting memory and enabling remote code execution.
RCE via stale global state
A fatal error can leave a worker pointing at memory from a previous request. A later request on the same worker then uses that freed memory (use-after-free) — RCE and memory disclosure confirmed.
Orhun Agency note: This is independent of your CMS. WordPress, Laravel, Magento or custom apps — if the PHP version is vulnerable, the risk is the same. Managed servers under our care have been prioritized for patching; if you self-host, follow the plan below immediately.
Who is affected?
- Almost every PHP version since 5.4 Patches shipped for supported branches; 8.1 and older have no official release (source backports exist).
- WordPress, Drupal, Joomla, Laravel, Magento… Secure application code does not help if the runtime is vulnerable. Plugin/theme updates do not fix these CVEs.
- Hosting, VPS, shared servers, appliances Embedded PHP in devices and admin panels is also at risk.
Safe versions (upgrade here now)
| Current branch | Status | Target version |
|---|---|---|
| PHP 8.5.x (< 8.5.12) | Vulnerable | 8.5.12 |
| PHP 8.4.x (< 8.4.27) | Vulnerable | 8.4.27 |
| PHP 8.3.x (< 8.3.36) | Vulnerable | 8.3.36 |
| PHP 8.2.x (< 8.2.35) | Vulnerable | 8.2.35 |
| PHP 7.4 – 8.1 | EOL / no official | Source backport or move to a supported branch |
| PHP ≤ 7.3 | EOL, no fix | Migrate to supported PHP 8.x |
15-minute response plan
- Identify the versionCheck the running PHP version via SSH or your hosting panel.
php -v
# or: <?php echo PHP_VERSION; ?> - Upgrade to a patched releaseUse apt / yum / remi / ondrej PPA / CloudLinux selector / cPanel MultiPHP. If you use distro packages, follow your vendor advisory.
- Restart every PHP workerOtherwise old processes stay vulnerable.
sudo systemctl restart php8.3-fpm
sudo systemctl restart apache2 # or nginx + fpm - VerifyConfirm the live version is patched. Smoke-test staging, then production.
- Hunt logs from 17 October onwardAmazon Threat Intelligence saw the first attempt on 17 October. Watch for workers spawning shells, unexpected outbound connections, new suspicious .php files, and sudden crash/OOM spikes.
Temporary mitigations before patching
Important: These reduce exposure but do not make an install safe. PHP states that updating is the only complete fix. If you cannot patch, isolate internet-facing systems.
- CVE-2026-109618 Set
memory_limit=-1in a way apps cannot override. Side effect: weaker memory control. - CVE-2026-109619 Set
session.upload_progress.enabled=0and on PHP 8.5fatal_error_backtraces=0. Restart all workers afterwards. - WAF (Cloudflare, etc.) Rules for known vectors are a stopgap only and only apply to traffic routed through the WAF.
Monitoring checklist
- Worker → shell
php-fpm/httpdspawningsh,bash,curl,wget. - New files in the web root Especially webshell .php files, hidden dirs, files changed after 17 October.
- Abnormal request patterns Huge POST bodies, OOM-forcing requests, repeated fatal errors / worker crashes.
FAQ
My site is WordPress / Laravel — is a plugin update enough?
I use shared hosting — what should I do?
Does a WAF alone protect me?
What about legacy PHP 7.4 / 8.0 / 8.1?
Is exploitation happening in the wild?
Need help patching PHP on your server?
Orhun Agency is prioritizing PHP2Shell remediation on managed projects. For your own server or hosting account we can help with version checks, safe upgrades and post-patch monitoring.
Get supportSources: PHP Advisory · PHP Foundation · CISA · Wiz · NCSC-NL