PHP Fixes Two Vulnerabilities That Allow Unauthenticated Server-Side Code Execution

The PHP team has patched two vulnerabilities that allowed attackers to run code on a server without an account. Site owners should check the PHP instances handling web requests and background jobs.

· 5 min read · 1 comment

On October 21, the PHP team released fixes for two memory-handling bugs that could let an attacker run code on a server without an account. As Habr reports in its article on the PHP update, the fixes are included in versions 8.2.35, 8.3.36, 8.4.27, and 8.5.12. Site owners need to check not just the version reported in the terminal, but the PHP instance actually serving visitors.

What was fixed, and why visitors matter

One bug, CVE-2026-109618, occurred during memory cleanup after a script was interrupted. The other, CVE-2026-109619, involved accessing freed memory while processing the next request. Neither was a flaw in a login form or an individual user's permissions: the problem was in the interpreter itself.

For Apache with mod_php, the developers confirmed that arbitrary code could be executed before control even passed to the application. Permission checks within the site cannot help here: the application never gets a chance to run them. Sites running nginx and PHP-FPM should not skip the update either. We previously covered the release of four PHP updates on the blog; now the key question for any given site is which build it is running.

There is also a separate issue whose conditions the PHP team clarified on October 23: CVE-2026-115560. It arises from a particular combination of settings and application behavior. Upload progress tracking must be enabled, and the site must switch its session serialization handler from php_binary or php_serialize to php before calling session_start(). As a temporary measure, the developers suggested setting session.upload_progress.enabled=0. Files should still upload afterward, but any progress indicator that reads its data from the PHP session is worth checking. This is a question not just of applying a fix, but of how the site handles uploads.

What to check on a live site

The php -v command shows the version of the interpreter launched from the terminal. But a visitor's request may reach a different PHP process: for example, nginx passes requests to PHP-FPM. A background process that handles documents may also run under a separate interpreter—even an older build whose path remains in the service configuration. Cron jobs and Docker containers have their own runtime environments. It would be all too easy to check the terminal and declare the entire site updated.

Version numbers need to be checked in light of where the package came from. For the main PHP branches, the fixed versions are 8.2.35, 8.3.36, 8.4.27, and 8.5.12. But a distribution may backport the fix into a build with a different version number: the article gives the example of Ubuntu 24.04 with package 8.3.6-0ubuntu0.24.04.13. For CentOS Stream 10, it lists php-fpm-8.3.36-1.el10. If PHP came from another repository, look to that build's provider for confirmation of the fix rather than comparing only the first few digits of the version number.

In practice, the plan is to find out which PHP instance handles web requests, which one runs background jobs, and what is installed inside any containers in use. Then update the relevant builds, restart the necessary processes, and make sure the site is responding through the patched PHP instance. For a container, updating packages on the host alone is not enough: you need to update the image and recreate the container with the same volumes. Otherwise, you could diligently update a server that the application's requests never even reach.

After the update, it is worth walking through a real user flow. The article uses Kanboard for this: first, sign in, attach and download a file, and leave the tab open. After updating, return to the open Kanboard tab, check whether you are still signed in, download the old attachment, and attach a new one. Then run the normal background job separately and check whether you can sign in again after signing out. This kind of test tells you more than a page showing the version number: an order record might remain in the database while its attached file fails to save to disk. If a 502 error appears after the restart, the article suggests starting the investigation with the PHP-FPM log and the socket nginx uses to forward requests.

My take: an update doesn't end with a version number

I would start by finding every place PHP runs. I'm building my first portfolio site myself, and I've already learned that even “just adding registration” turns into a chain of checks. There is a similar trap here: it feels good to see a current version in the terminal, but it does little for visitors if another process handles their requests. The terminal answered the question honestly—it just wasn't a question about the whole site.

I like the approach of testing the full journey, from signing in to adding a new attachment and running a background job. Not because an update needs a grand ceremony. It's just that a bug that only shows up on the next invoice can wait far more patiently than a developer. And if the site is moved to another server as part of the update, I would separately check records and files created after the copy: a successful test with an old order says nothing about the next one.

Sources

Where the news comes from. The text is a retelling in the author’s own words; the facts come from the source, the opinion is the author’s.

  1. PHP после октября — обновляйтесь, пока не поздно habr.com

About the author

Otabek Hamraev

junior backend developer

I’m learning backend development and building my first portfolio site on the side. I’ve already found that “just add registration” usually means more work than adding one button.

All posts by the author

Leave a comment

Not published. We’ll send a link to confirm your comment.

No links or ads. Your first comment is published after review. By sending a comment you agree to the privacy notice.

  1. Does the advice to check the PHP instance serving visitors also apply to background workers, or do these fixes only affect requests handled by the web server?