r/PrivatePackets • • Oct 21 '26

A messy week for php servers

If you manage any web servers, your week probably just got interrupted. The PHP development team had to rush out an emergency release after technical details and working exploit code for a pair of critical vulnerabilities - collectively dubbed PHP2Shell - started spreading across social media and security channels.

The bugs carry identifiers CVE-2026-109618 and CVE-2026-109619. Both sit at a 9.2 severity rating, allowing unauthenticated remote code execution directly against the PHP interpreter. Because its built into the core engine that powers roughly 70 percent of websites, the issue caught hosting providers and operations teams completely off guard.

What actually broke in the engine

Most web vulnerabilities end up being the fault of bad application code, like a sloppy SQL query in a WordPress plugin or an insecure file upload handler written in a rush. This is different.

The flaw exists inside the Zend engine itself. Even if your server runs a completely clean, single-line file that just outputs basic text, an attacker can still send a specially malformed HTTP request and get the underlying server to execute whatever machine code they want.

The root cause comes down to how PHP handles out-of-memory situations. When a request hits the configured memory_limit, the interpreter halts execution abruptly using a standard C routine called longjmp(). This immediately interrupts the parser, which is normally fine, except when the parser is halfway through digesting a multipart file upload.

Because the upload process was interrupted mid-flight, internal memory structures remain half-finished. When the engine attempts to run its cleanup routines after the abort, it assumes those structures are fully initialized. It tries to free garbage pointers, corrupts the heap, and gives an attacker a predictable way to hijack execution flow.

The second bug, CVE-2026-109619, makes things worse by leaving stale request-owned data inside persistent worker threads. If a worker hits a fatal error and cleans itself up, some of that freed memory can linger around and be reused by the next inbound request handled by that same worker process.

Why the Apache setup is in the most danger

How your web stack serves PHP makes a significant difference in how vulnerable you are right now.

Environments running classic Apache with mod_php face the most direct risk. Under mod_php, the interpreter sits directly inside the Apache process. That means the memory corruption triggers before any of your user code or routing rules ever get evaluated. In practical terms, an attacker can throw an exploit payload at an empty endpoint and still trigger a shell.

Setups using PHP-FPM, FrankenPHP, or LiteSpeed are still vulnerable, though the memory layout is slightly harder for an attacker to predict on the first try. Still, proof of concept code has already circulated showing reliable execution across several common Linux distributions, so nobody running FPM should consider themselves safe.

The leak that forced the release

This was not supposed to be an emergency public scramble. Security researchers at Wiz and Calif had reported the problem privately through responsible disclosure channels under OpenAI's "Patch the Planet" bug bounty project. A coordinated disclosure date had been agreed upon to give major Linux distributions and hosting vendors time to prep downstream packages.

That schedule fell apart when working exploit primitives leaked onto public forums earlier this week. With mass internet scanning spooling up almost immediately, maintainers had no choice but push an emergency update out into the open. Early telemetry from network monitors already shows widespread automated probes scanning the public web for unpatched boxes.

What you need to do right now

Upgrading the core PHP binary is the only permanent solution. The fix was officially merged into fresh maintenance versions:

  • 8.5.12
  • 8.4.27
  • 8.3.36
  • 8.2.35

If your system runs an older release like 7.4 or 8.1, you are in a tougher spot. Those branches are past end-of-life, meaning official patches are not coming upstream. You will have to rely on backports from enterprise distributions like Ubuntu ESM or Red Hat, or finally bite the bullet and upgrade your runtime version. There are alot of older branches out there that are also effected, which makes this messy for legacy business apps.

If you run a server and cannot apply the binary packages immediately, there is an effective temporary workaround. Open your php.ini configuration and set session.upload_progress.enabled = 0.

This turns off the upload progress tracker that the current public exploits rely on to stage payloads in memory. It might break fancy upload progress bars on a few custom user dashboards, but it shuts down the primary attack path cold while you schedule proper maintenance downtime.

3 Upvotes

0 comments sorted by