Critical PHP vulnerabilities (21 October 2026): what every organisation should do
Update: 21 October 2026, evening. The fixes have been released. The vulnerabilities are CVE-2026-109618 and CVE-2026-109619, and the fixed versions are PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. This article now includes the details from the official advisories.
On 21 October 2026 the PHP Foundation released fixes for two critical vulnerabilities in PHP, each rated 9.2 on the CVSS v4.0 scale. Both can lead to unauthenticated remote code execution, and exploitation has been confirmed against Apache with mod_php in its default configuration. Any organisation that runs PHP, directly or through applications, hosting or appliances that bundle it, should patch now.
Key points
- Two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619, each scored CVSS v4.0 9.2, both use-after-free flaws with a risk of remote code execution.
- All versions before 8.2.35, 8.3.36, 8.4.27 and 8.5.12 are affected. Updating is the only complete fix.
- The UK National Cyber Security Centre (NCSC) has issued an alert to UK organisations. The risk, however, is global: PHP runs on 69.3% of websites whose server-side language is known (W3Techs, 21 October 2026).
- Partial temporary mitigations exist for systems that cannot be patched immediately; where those are not feasible, the NCSC advises considering taking the system offline.
- End-of-life PHP versions (8.1 and older) receive no fixes, and the NCSC flags them as a particular concern. Roughly a third of PHP websites still run version 7 or older.
What was announced, and why it matters everywhere
On 20 October the PHP Foundation gave advance notice of a security release for two critical vulnerabilities, without details, so administrators could prepare. The fixes and technical advisories followed on 21 October. This is typical of coordinated disclosure: information that would help attackers only appears together with the fix.
The NCSC turned the notice into an official alert for UK organisations, with unusually firm advice: if a system cannot be remediated, consider taking it offline. The alert is addressed to the UK, but nothing about the problem is local. PHP powers WordPress, Drupal, Joomla, Magento, Laravel, Moodle, Nextcloud, most e-commerce platforms and a large share of the world’s shared hosting. Attackers scanning the internet do not respect borders.
The two vulnerabilities in brief
CVE-2026-109618 (GHSA-w8hw-w9fx-j79w), code execution via out-of-memory corruption. When a memory allocation fails, PHP aborts the request abruptly. If that happens while request data is only partly initialised, request shutdown can work with invalid data. An attacker can deliberately exhaust memory with crafted multipart requests while staying within post_max_size. The advisory confirms unauthenticated remote code execution on Apache with mod_php using default settings; PHP-FPM is rated as likely susceptible.
CVE-2026-109619 (GHSA-6wmf-4rv5-p3rp), code execution via stale global state. PHP worker processes that serve multiple requests can keep references to memory already freed at the end of a previous request. A later request handled by the same worker can then use that memory. The advisory confirms a code execution path in PHP 8.5 when fatal_error_backtraces is enabled, and a path through session upload progress, validated against mod_php and PHP-FPM.
| PHP branch | Vulnerable | Fixed version |
|---|---|---|
| 8.5 | below 8.5.12 | 8.5.12 |
| 8.4 | below 8.4.27 | 8.4.27 |
| 8.3 | below 8.3.36 | 8.3.36 |
| 8.2 | below 8.2.35 | 8.2.35 |
| 8.1 and older | potentially affected (NCSC) | no official fix |
Why this should be treated as urgent
Both vulnerabilities are exploitable over the network, without authentication and without user interaction, with maximum impact on confidentiality, integrity and availability. Code runs with the privileges of the web server process, which is exactly the level from which an attacker can read the application database, plant a backdoor or stage a ransomware attack.
Recent history shows how short the window is. CVE-2024-4577, a PHP-CGI flaw on Windows disclosed in June 2024, was exploited within days, including by ransomware groups. Once a fix ships, attackers compare the old and new code and rebuild the vulnerability. Now that the advisories even describe the attack vectors, the gap before the first automated attacks is measured in hours or days.
Where PHP hides in your infrastructure
The NCSC’s first recommendation is to identify every system running any version of PHP. In practice, PHP shows up in more places than most organisations expect:
- websites and web applications: the corporate site, the online shop, the customer portal, the intranet, the e-learning platform;
- shared hosting and cPanel/Plesk: the provider updates PHP, but each site often picks its own version and old versions stay available;
- containers: Docker images based on
phpdo not update themselves; they must be rebuilt and redeployed; - Linux distribution packages: Debian, Ubuntu, Red Hat and their derivatives backport fixes into their own versions, so the version number will not match the one announced on php.net; check your distribution’s security advisory;
- third-party appliances and products: management interfaces of firewalls, NAS devices, routers, monitoring systems or VoIP platforms that bundle PHP without making it obvious; the NCSC points to the inventory of PHP-dependent products maintained by NCSC-NL;
- vendor-managed services: the web agency, integrator or SaaS provider running the application on your behalf.
What to do now, step by step
Patching
- Inventory. List every system running PHP, with its exact version (
php -vor the application’s information page) and an owner for each. Internet-facing systems come first. - Update to 8.2.35, 8.3.36, 8.4.27 or 8.5.12, or to your Linux distribution’s fixed package. Internet-facing systems first, then internal ones.
- Restart every process of PHP-FPM, Apache or the web service. Otherwise old processes keep running the vulnerable code.
- Rebuild container images and redeploy them; updating the host is not enough.
- Check the version actually running after the update, not just the installed package.
- Contact your vendors. Ask your hosting provider, web agency and appliance vendors when they will ship the fix and what you need to do.
Temporary mitigations if you cannot patch immediately
The PHP advisories state explicitly that no configuration fully removes the risk. The measures below reduce exposure until you patch; they do not replace patching. Restart all PHP workers after each change.
- disable session upload progress,
session.upload_progress.enabled=0, if the application does not use it (recommended even after patching); - on PHP 8.5, set
fatal_error_backtraces=0; - block multipart requests at the front-end server or WAF if the application does not use them, and cap request size, input variables, parts and headers per part;
- keep
post_max_sizeconservative and reducemax_input_nesting_level; - if performance allows, set
pm.max_requests=1in PHP-FPM so each worker serves a single request; - restrict internet access or put the application in maintenance mode; if neither is possible, consider temporary shutdown, as the NCSC advises.
Checking after the update
The NCSC advises checking systems that remained exposed for signs of compromise and backdoors. Look in web server logs for unusual or very large multipart requests, repeated out-of-memory errors, new processes spawned by the web server user and recently created PHP files in upload or temporary directories.
If you run an end-of-life PHP version
The officially supported PHP branches are 8.2 and 8.3 (security fixes only) and 8.4 and 8.5 (active support). Branch 8.2 reaches end of life on 31 December 2026. Versions 8.1, 8.0, 7.x and older receive no fixes, and the NCSC states that all versions may be affected, with unsupported versions a particular concern.
According to W3Techs, 27% of PHP websites still run version 7 and almost 8% run version 5. There will be no official fix for them. The realistic options are migrating to a supported branch, using an extended-support provider or a Linux distribution that still maintains that version, or strictly isolating the application together with the temporary mitigations above. It is also a good moment to plan migrating applications off 8.2 before the end of the year.
What it means for NIS2 entities
In the European Union, essential and important entities under the NIS2 Directive must handle vulnerabilities and apply technical measures proportionate to risk, and management bodies are accountable for those measures. A publicly announced critical vulnerability with a known release date is exactly the kind of event an auditor will later look at: how quickly you reacted and how you documented your decisions. Keep a record: when you learned about it, which systems you identified, when you patched them and what you did with those you could not patch.
If you find signs of compromise after patching, it becomes an incident. For NIS2 entities, significant incidents must be notified to the competent authority or CSIRT (in Romania, DNSC), and if personal data is affected, notification to the data protection authority under Article 33 GDPR must also be assessed.
Frequently asked questions
Which PHP version should I update to?
To PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12, depending on the branch you use, or to your Linux distribution’s fixed package. After updating, restart all PHP processes and check the version actually running.
Which PHP versions are affected?
All versions before 8.2.35, 8.3.36, 8.4.27 and 8.5.12. The NCSC states that all versions may be affected, and end-of-life versions (8.1 and older) receive no fixes.
Does the NCSC alert only apply to the UK?
The alert is addressed to UK organisations, but the vulnerabilities are in PHP itself, which runs on about 69% of websites whose server-side language is known. The risk is the same for any organisation in the world that uses PHP.
What if I cannot patch immediately?
Apply the temporary mitigations from the PHP advisories: disable session.upload_progress if unused, set fatal_error_backtraces=0 on PHP 8.5, block or cap multipart requests, then restart workers. They do not fully remove the risk. If they are not feasible, the NCSC advises considering taking the system offline until it is fixed.
I have a WordPress site on shared hosting. Do I need to do anything?
Check in your hosting control panel which PHP version the site uses and whether it is a supported branch. Ask the provider whether 8.2.35, 8.3.36, 8.4.27 or 8.5.12 is already in place. If the site runs on PHP 7 or an end-of-life 8.x version, ask to move to a current one.
How do I check whether a server has already been compromised?
Look in web server logs for unusual multipart requests, repeated out-of-memory errors, processes started by the web server user and recently created PHP files in upload or temporary directories. If you find indicators, do not delete anything before preserving evidence, and request a technical analysis.
Sources
- PHP, “RCE via OOM corruption”, GHSA-w8hw-w9fx-j79w / CVE-2026-109618, 21 October 2026
- PHP, “RCE via stale global state”, GHSA-6wmf-4rv5-p3rp / CVE-2026-109619, 21 October 2026
- PHP Foundation, “Upcoming Critical PHP Security Release”, 20 October 2026
- NCSC (UK), “Critical security issue affecting PHP”, 21 October 2026
- PHP, “Supported Versions”
- W3Techs, “Usage statistics of PHP for websites”, 21 October 2026
Alexandru Angheluș, ProDefence. Cybersecurity specialist working in cyber incident investigation, malware analysis and NIS2 compliance.



