The PHP project has designated new patched releases for all of its supported branches after publishing a batch of security advisories. The updates close critical flaws that, under specific conditions, could allow remote code execution, alongside bugs that could cause denial of service or expose parts of memory.

The patched releases are PHP 8.2.36, 8.3.37, 8.4.28 and 8.5.13. Server administrators need to check the actual version their sites are running against these numbers, not just confirm that an update package exists in a system repository or a container image.

Which PHP versions need the update?

In broad terms, the affected versions are PHP 8.2 before 8.2.36, 8.3 before 8.3.37, 8.4 before 8.4.28 and 8.5 before 8.5.13. But each flaw has its own scope and conditions: one critical memory-safety bug is specific to the 8.5 branch alone, while the session-handling issues extend across several branches.

Among the most notable official advisories is a session serializer mismatch, which can pass attacker-controlled data into PHP's deserialization engine. Exploiting it requires a session store shared between configurations that use different serializer formats, plus suitable gadget classes present in the application, meaning a "critical" rating doesn't mean every PHP server is exploitable in the same way.

Not every flaw is equally exploitable

A session-file flaw can leave fragments of an old session behind when a write is interrupted, which may allow code execution if an attacker can influence the session data, interrupt the write at the right moment, and find a usable deserialization gadget chain. A separate PHP-CGI flaw is limited to specific CGI/FastCGI setups with cgi.fix_pathinfo=1; PHP-FPM and PHP running as an Apache module are not affected, according to the official advisory.

The update also closes an issue where a malicious server could trigger excessive CPU consumption by sending HTTP response headers folded across many continuation lines. This scenario requires the application to fetch a response the attacker controls; simply having allow_url_fopen enabled is not, by itself, enough to put an application at risk.

Illustration of a server moving from an unprotected, warning-flagged state to a shielded, verified-secure state after a security patch

What if the patch hasn't reached you yet?

The priority is installing the patched release for your branch from a trusted source, then restarting PHP-FPM workers or the web server and any affected containers, and verifying the version number the web path itself is actually executing. An OS vendor or Docker image may lag in shipping the package, so check the package's own source and changelog rather than assuming the branch name alone proves the fix is in place.

When an immediate update isn't possible, the advisories offer partial mitigations depending on the specific flaw: disabling session.upload_progress.enabled if the feature isn't needed, unifying session.serialize_handler and isolating session stores, or setting cgi.fix_pathinfo=0 after testing your application's paths in php-cgi environments. These reduce risk; they are not a permanent substitute for updating.

Is updating PHP through the package manager enough?

Proving the live service actually moved to the patched version matters more than running the update command. An FPM worker can stay loaded with old code in memory, or a site may share a session store with other configurations using different settings. Check the version from inside the running path itself, then review session settings and logs after the restart.

The official sources reviewed for this piece had not announced any confirmed exploitation of these flaws at the time of writing. That distinction, between a vulnerability existing, a service outage, and a confirmed breach, is worth keeping in mind when reading follow-up coverage of incidents like this.