News · PayStars

PHP2Shell: two critical PHP vulnerabilities — which version to update to

CVE-2026-109618 and CVE-2026-109619 (CVSS 9.2) allow remote code execution on PHP servers. Fixed versions and a practical checklist.

Published:

PHP2Shell: two critical PHP vulnerabilities — which version to update to

On October 21, the PHP project shipped an emergency security release fixing two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619. The US NSA refers to them collectively as "PHP2Shell". Because a huge share of websites, online shops and Telegram bots run on PHP, this matters to anyone who operates a site or a bot.

What the vulnerabilities are

According to the PHP Foundation, both bugs sit in parts of PHP that nearly every request touches — memory management and error handling:

  • CVE-2026-109618 — if a request hits `memory_limit` at exactly the wrong moment, PHP can leave internal data partially initialized and later treat it as valid, corrupting memory. On Apache with mod_php an unauthenticated request can trigger this before any application code runs, and full remote code execution was demonstrated with default settings. RCE was also confirmed on PHP-FPM through application-level code paths.
  • CVE-2026-109619 — a fatal error at the wrong point can leave internal state pointing to freed memory from a previous request (use-after-free). The reporter demonstrated RCE against a real-world application on Apache mod_php.

Finland's National Cyber Security Centre (Traficom) rates the issues 9.2 under CVSS 4.0 — critical. The PHP Foundation explicitly noted that the 10.0 score that leaked on social media is incorrect.

Affected and fixed versions

BranchAffectedFixed in
PHP 8.58.5.0–8.5.118.5.12
PHP 8.48.4.0–8.4.268.4.27
PHP 8.38.3.0–8.3.358.3.36
PHP 8.28.2.0–8.2.348.2.35
PHP 8.1 and olderallno official fix

Per the AWS security bulletin, PHP 5.4–8.1 are end-of-life with no planned fix; migrating to a supported branch is the only path.

How governments and agencies responded

CISA urged immediate patching and said it had not observed exploitation at the time of publication. It advised organizations that cannot update right away, or that still run PHP 8.1 or earlier, to take PHP-based systems offline until patched. The NSA gave similar advice. According to the BBC, Finland temporarily shut down the government's public web services, and the website of the Dutch lower house of parliament (Tweede Kamer) became inaccessible.

Who found them

The PHP Foundation says a PHP core developer spotted the first signs of the out-of-memory problem in 2024, but no concrete attack path was found then. In August 2026 a researcher at Calif, OpenAI and later Wiz independently reported that it could lead to RCE. AI tools played a major role in the research, and the BBC reports that the flaws were discovered by AI.

Practical checklist

  1. Find your version with `php -v` and `php-fpm -v`; one server can run several PHP versions side by side.
  2. Update through your package manager (for example `apt update && apt upgrade`) and restart PHP-FPM or Apache.
  3. If your distro package keeps the old version number, confirm in its changelog that both CVEs are fixed.
  4. On PHP 8.1 or older, plan a move to 8.2+ and restrict internet exposure until then.
  5. Do not forget Docker images, hosting panels and off-the-shelf CMS installs — they bundle PHP too.
  6. Watch your logs: a PHP worker launching a shell or downloading tools is a serious red flag.
Reminder: buying Telegram Stars or Premium never requires downloading a "PHP update". Messages asking you to do so may be a scam.

FAQ

I am a regular Telegram user. Do I need to do anything?

You do not need to install anything: the flaws are on servers. But do not open suspicious files posing as a "PHP update", and never share passwords or login codes.

My Telegram bot is written in PHP. Is it at risk?

If PHP handles your bot's webhook, yes — update the server. Check the version with `php -v` and install a fixed release.

My distro package still shows an old version number. Am I vulnerable?

Ubuntu and Debian often backport fixes without changing the upstream number. Check the package changelog for CVE-2026-109618 and CVE-2026-109619.

Sources

Buy Stars and Premium with USD (USDT)

Via API key: 0% (plain Fragment price). Via the website: 5%.

Get started