1. Emergency Summary: What Is Going On?
In late October 2026, the PHP core security team released emergency point releases addressing a pair of severe vulnerabilities dubbed PHP2Shell:
- CVE-2026-109618 (CVSS 9.2 Critical): Out-of-memory handling error during multipart HTTP request parsing. Unauthenticated attackers can send a single crafted POST request with file upload boundaries to corrupt memory and hijack execution flow.
- CVE-2026-109619 (CVSS 9.2 Critical): Request-owned internal state persisting across requests on persistent server processes (such as PHP-FPM, Apache mod_php, LiteSpeed, and FrankenPHP), leading to use-after-free and state pollution.
- CVE-2026-115560 (CVSS 7.5 High): Session upload progress handling logic flaw that attackers chain to stage payloads in memory.
This is not a theoretical bug discovered in a laboratory. It is an unauthenticated Remote Code Execution (RCE) flaw actively exploited across the globe. You do not need to have a file upload form on your website. Even if your site only shows a static "Hello World" or a login page, PHP still processes incoming multipart requests before handing control over to your code.
2. Quick Check: Are You Vulnerable?
Run this simple terminal command on your production server or staging container right now:
php -v
If you run Docker containers with Laravel, WordPress, or custom APIs:
docker compose exec app php -v
Compare your output against this table. If your version is lower than the safe version listed, you are exposed:
| Branch | Vulnerable Versions | Safe Version (Patched) | Status |
|---|---|---|---|
| PHP 8.5 | <= 8.5.11 | 8.5.12 or newer | Patched Oct 21, 2026 |
| PHP 8.4 | <= 8.4.26 | 8.4.27 or newer | Patched Oct 21, 2026 |
| PHP 8.3 | <= 8.3.35 | 8.3.36 or newer | Patched Oct 21, 2026 |
| PHP 8.2 | <= 8.2.34 | 8.2.35 or newer | Patched Oct 21, 2026 |
| PHP 8.1 & 7.x | All versions | End-Of-Life (No official patch) | Dangerous: Must upgrade runtime |
3. The Bug in Plain English (No C Degree Required)
To understand why this bug exists, you don't need a degree in computer engineering. Let's break it down with a simple real-world analogy.
The Restaurant Analogy
Imagine a busy restaurant. In front of the kitchen sits a receptionist whose only job is to receive customer orders at the front counter, sort the tickets, and hand them to the chef in the kitchen.
Now imagine an attacker walks up to the counter and hands the receptionist an enormous stack of papers that is 50 feet tall. The receptionist tries to stack them on the desk, but the desk collapses under the weight. Panicked, the receptionist runs out the back door without locking the cash register, leaving master keys and private safe combinations scattered across the floor.
Before the chef in the kitchen even knows an order was attempted, an intruder has already walked past the desk and taken control of the building.
What Actually Happens Inside PHP's Engine
When someone uploads a file to your website, their browser sends an HTTP request formatted as multipart/form-data. Before PHP loads your application code (such as Laravel's index.php or WordPress), the underlying PHP runtime engine in C reads the incoming network stream.
To process these uploaded files, PHP allocates blocks of memory on the system heap. If an incoming upload exceeds PHP's memory limit (memory_limit), PHP triggers an internal emergency exit known as zend_bailout().
In standard C programming, functions clean up after themselves: they free allocated pointers, restore saved CPU registers, and close open buffers. But zend_bailout() uses a low-level C mechanism called longjmp(). This acts like an emergency ejection seat: it immediately jumps execution back to the outer loop without running standard cleanup handlers.
Because the cleanup never happened, the memory pointers are left in a corrupted, half-initialized state. By sending a carefully timed sequence of multipart boundaries, an attacker can manipulate this corrupted memory, overwrite function pointers on the heap, and force the CPU to execute their own binary commands.
4. Why Your Framework Cannot Protect You
Many developers assume their web framework will catch malicious requests. They think:
"We use Laravel with Sanctum authentication, strict CSRF validation, and custom request validation rules. Surely an attacker gets blocked with a 401 or 422 error?"
Unfortunately, that is not how web servers work. Look at the request lifecycle:
- The client sends an HTTP POST request to your web server (Nginx, Apache, or LiteSpeed).
- Nginx forwards the FastCGI stream to PHP-FPM.
- PHP-FPM parses the multipart body into $_POST and $_FILES. (THE BUG HAPPENS HERE)
- PHP initializes global variables.
- PHP finally executes
public/index.php(Laravel boots, routes match, middleware runs).
The vulnerability triggers at Step 3. Your Laravel middleware, WordPress security plugins (like Wordfence), rate limiters, and authentication checks never even get a chance to execute. The server is compromised before your PHP script takes its first breath.
5. Step-by-Step Fix Guide: How to Patch in 5 Minutes
Here are the exact instructions for the most common production environments.
Option A: Ubuntu & Debian Servers (apt with Ondrej Sury PPA)
If you manage a VPS or dedicated server on DigitalOcean, AWS EC2, Linode, or Hetzner, update your PHP packages via apt:
# 1. Update your repository index
sudo apt update
# 2. Upgrade PHP-FPM and CLI packages (example for PHP 8.3)
sudo apt --only-upgrade install php8.3-fpm php8.3-cli php8.3-common
# If you are on PHP 8.4:
# sudo apt --only-upgrade install php8.4-fpm php8.4-cli php8.4-common
# 3. CRITICAL STEP: Restart PHP-FPM service
sudo systemctl restart php8.3-fpm
# 4. Verify the new version is active
php -v
php-fpm8.3 -v
Option B: Docker & Containerized Environments
If your application runs inside Docker or Kubernetes, updating packages on your host machine will not protect your containers. You need to pull the official updated base image and rebuild:
# 1. Pull the latest upstream image tags
docker compose pull
# 2. Rebuild your application image without cache to guarantee fresh binaries
docker compose build --no-cache --pull app
# 3. Restart your stack with zero downtime rolling replacement
docker compose up -d --force-recreate app
# 4. Confirm the container runs the safe version
docker compose exec app php -v
If your Dockerfile pins exact version tags (for example, FROM php:8.3.34-fpm-alpine), manually bump the tag to php:8.3.36-fpm-alpine or php:8.4.27-fpm-alpine.
Option C: cPanel & Managed Shared Hosting
If you host websites on cPanel, CloudLinux, or Plesk:
- Log into your hosting control panel.
- Search for MultiPHP Manager or Select PHP Version.
- Look at the patch release shown next to your PHP version. Most major hosting providers (Hostinger, SiteGround, Namecheap) deployed automated hotfixes across October 23-25.
- If your version still displays an older release (such as 8.3.32), switch your domain to PHP 8.4 (which has been patched) or open an emergency priority ticket with your host asking for the CVE-2026-109618 kernel/PHP update.
6. Emergency Mitigations (If You Cannot Upgrade Immediately)
If your server is tied to legacy software or you need management approval before deploying point releases, apply these three immediate defensive shields:
1. Disable Session Upload Progress
CVE-2026-115560 relies on PHP's built-in session upload progress tracking. Disabling this feature closes one of the most reliable exploitation chains. Open your php.ini file (both for CLI and FPM):
; In /etc/php/8.3/fpm/php.ini and /etc/php/8.3/cli/php.ini
session.upload_progress.enabled = 0
Save the file and restart PHP-FPM.
2. Filter Malicious Multipart Requests at the Reverse Proxy
If you use Nginx in front of PHP-FPM, you can restrict client request body sizes on endpoints that do not accept file uploads. Add this to your nginx.conf:
# Restrict request body size globally unless needed
client_max_body_size 10M;
# Drop requests with suspicious multipart boundaries or zero content-length
if ($content_type ~* "multipart/form-data.*boundary=.*boundary=") {
return 400;
}
3. Cloudflare or AWS WAF Rules
If your DNS routes through Cloudflare, make sure your Managed Ruleset is active. Cloudflare issued emergency WAF signatures on October 21 targeting CVE-2026-109618 and CVE-2026-109619 to drop malformed multipart request payloads before they reach origin servers, with iterative rule updates continuing through late October as attackers mutated payloads.
7. How to Verify You Are Actually Safe
Do not guess. Verify that the processes currently accepting user traffic in production are using the patched library.
Run this command on your Linux server to inspect the active binary of running PHP-FPM workers:
# Find the PID of an active php-fpm worker
ps aux | grep php-fpm
# Check the exact version of the running binary
/usr/sbin/php-fpm8.3 -v
If the output prints PHP 8.3.36, PHP 8.4.27, or PHP 8.5.12, your server is safe from the vulnerability. You can sleep peacefully tonight.
8. Frequently Asked Questions
Can an attacker exploit my server if my site has zero file upload forms?
Yes. An attacker does not use your HTML form. They send a direct raw HTTP POST request with a Content-Type: multipart/form-data header directly to any public URL on your domain (even /, /login, or a 404 URL). PHP parses the body before knowing what the URL is.
I use FrankenPHP or RoadRunner. Am I affected?
Yes. FrankenPHP and RoadRunner use libphp or worker loops. In fact, long-running worker processes can be even more sensitive to CVE-2026-109619 because internal state leaks across consecutive worker executions. Update your base PHP build and restart your worker pools.
Does setting memory_limit = -1 protect against this?
No. Setting memory_limit to -1 is dangerous in production because an attacker can simply send a multi-gigabyte stream to exhaust your physical server RAM, triggering an OS-level OOM kill that crashes your entire database and web server.
9. Quick Action Checklist
- Run
php -vand verify whether your version is below 8.2.35, 8.3.36, 8.4.27, or 8.5.12. - Run
sudo apt --only-upgrade install php8.x-fpm(or rebuild Docker images). - Restart your PHP service:
sudo systemctl restart php8.x-fpm. - Set
session.upload_progress.enabled = 0inphp.iniif not already disabled. - Verify with
php-fpm8.x -vthat the live running process is updated.
Work with me
Need help securing or scaling your backend architecture?
I design high-performance systems, audit mission-critical server environments, and build resilient Laravel APIs that handle high concurrency without breaking a sweat.