The PHP fix is out. Patch now.
On 21 October PHP released fixes for two critical flaws that let an attacker run code on a web server without logging in. Early attacks are reported. Update your websites first, then everything else.
The EU's cyber team says unpatched sites may need to go offline
Reuters reports that CERT-EU, the EU's computer emergency response team, told organizations to prepare to patch immediately. Those that cannot patch should consider taking affected sites offline, or isolate internet-facing applications from public networks until a fix is applied.
The Australian Cyber Security Centre gave similar guidance, and said it was not aware of active exploitation. Cloudflare said attacks were emerging. Take the more cautious view: assume your sites are being probed.
PHP used only from the command line (cron jobs, scripts) is not named in the advisory. Patch it anyway, after the web-facing systems.
Where your PHP version stands
| Branch | Fixed in | Status | What to do |
|---|---|---|---|
| 8.5 | 8.5.12 | Fix released | Update now. Set fatal_error_backtraces=0 until patched. |
| 8.4 | 8.4.27 | Fix released | Update now. |
| 8.3 | 8.3.36 | Fix released | Update now. Ubuntu 24.04 backports the fix under its own version number. |
| 8.2 | 8.2.35 | Fix · EOL 31 Dec | Update now. Plan the move to 8.4 or 8.5 this quarter. |
| 7.4, 8.0, 8.1 | none | Backport only | Ask your Linux distribution or LTS vendor for a backport (Ubuntu 22.04 has PHP 8.1), or build from PHP's source backport. Then upgrade. |
| 5.x to 7.3 | none | No fix | Upgrade to 8.4 or 8.5. Until then, take it off the internet or put it behind a VPN or IP allowlist. |
Every server is a little different. Let Claude handle the corner cases.
Our commands cover the common setups. Real servers have held packages, broken repositories, missing dependencies and odd hosting panels. Paste the prompt below into Claude, or another AI assistant you trust, then run one command at a time and paste the output back.
- Run the start prompt once per server. Each step below has its own prompt too.
- Never paste passwords, keys, tokens or customer data into an AI. Redact them.
- Read each command before you run it. Ask the AI to explain anything that removes packages or reboots.
- Never let an AI fetch or run exploit code.
You are helping me patch PHP on one server for two critical vulnerabilities, CVE-2026-109618 and CVE-2026-109619 (unauthenticated remote code execution, PHP security release of 21 October 2026).
Facts to work from:
- Fixed versions: 8.5.12, 8.4.27, 8.3.36 and 8.2.35. PHP ships no release for 8.1 and older. Linux distributions may backport the fix under their own version number, so the package changelog listing both CVE IDs also counts as fixed.
- At risk: anything serving web requests (PHP-FPM, Apache mod_php, php-cgi, FrankenPHP, LiteSpeed).
- Official advisory: https://www.php.net/archive/2026.php#2026-10-21-5
Rules:
1. Keep me on the PHP branch I run now (8.3 stays 8.3). Only suggest another branch if mine has no fix.
2. Find out my operating system and how PHP was installed before you suggest any change. Do not assume.
3. Give me one command at a time and wait for me to paste the output.
4. Explain each command in one line. Warn me before anything that removes packages, restarts services or needs a reboot.
5. If a command fails, diagnose it from my output (for example a missing dependency that needs --fix-missing, a held package, a broken or outdated repository) and give the smallest safe fix.
6. Patch internet-facing sites first.
7. Never ask me to download or run exploit or proof-of-concept code.
8. We are done only when php -v shows a fixed version, or the package changelog lists both CVE IDs, and every PHP process has been restarted.
My server: [for example: Ubuntu 22.04, nginx with PHP-FPM, two WordPress sites, internet-facing]
Start by asking me for the first command to run.
Works the same in Claude.ai, the Claude desktop app, or Claude Code on the server itself. Replace the yellow part before you send it.
Eight steps, per server
Copying a command or prompt marks the step as taken. Mark complete confirms it once you have checked the result. Progress is saved in this browser only.
Websites, portals, stores, APIs, WordPress, Drupal, Magento, Laravel and CodeIgniter apps. Include containers and anything a hosting company runs for you. For each one, write down who installs PHP updates: your team, your host or a vendor. Not PatchPro.
ps aux | grep -E 'php-fpm|php-cgi|frankenphp|lsphp|httpd|apache2' | grep -v grep
dpkg -l 2>/dev/null | grep -E '^ii +(php|libapache2-mod-php)'; rpm -qa 2>/dev/null | grep -i php
docker ps --format '{{.Names}}\t{{.Image}}' 2>/dev/nullHelp me build an inventory of every system in my organization that runs PHP, so I can patch CVE-2026-109618 and CVE-2026-109619. Ask me about websites, customer portals, online stores, APIs, CMS platforms (WordPress, Drupal, Magento), custom apps, Docker containers and anything my hosting provider manages. For each one, capture: name, internet-facing yes or no, where it is hosted, who installs PHP updates, and how to reach them. Then give me the list as a table, internet-facing systems first.
What I know so far: [list your sites, servers and providers]The install method decides the update command. The same server can have more than one PHP, for example one on the host and another inside a container.
php -v cat /etc/os-release | head -3 apt-cache policy php$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')-common 2>/dev/null | head -4 curl -sI https://your-site | grep -i x-powered-by # from outside, if the header is exposed
WordPress: Tools → Site Health → Info → Server. Managed hosting: check the control panel, or ask the host.
I need to know exactly which PHP versions run on my server and how each was installed (distribution packages, ondrej/php or sury.org, Remi, Docker image, cPanel EasyApache, Plesk, compiled from source, Windows zip, Homebrew or FrankenPHP). Give me read-only commands, one at a time, and tell me what the output means. Include PHP inside Docker containers. Here is the first output: [paste the output of php -v and cat /etc/os-release]These commands keep you on the PHP version you run today, so 8.3 stays 8.3. Open the method that matches step 2. If anything fails, paste the error into the prompt at the bottom of this step.
Debian, Ubuntu apt · distro, ondrej/php or sury.org
V=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')
sudo apt-get update
sudo apt-get install --only-upgrade $(dpkg -l "php$V*" | awk '/^ii/{print $2}')
sudo systemctl restart php$V-fpm 2>/dev/null; sudo systemctl restart apache2 2>/dev/null
php -vAdd -s after install to preview. Stop if a newer branch appears. With ondrej/php, the unversioned php-* packages point at the newest branch, so this command uses versioned names only.
RHEL, Rocky, Alma, Fedora dnf · AppStream modules
dnf module list --enabled php # your stream stays as is sudo dnf upgrade --refresh 'php*' sudo systemctl restart php-fpm httpd rpm -q --changelog php-fpm | head -5 # Remi users: no update today. Switch to AppStream packages or build from source.
Docker official php image
# Keep the branch in the tag: FROM php:8.3-fpm (never php:latest) docker compose build --pull --no-cache docker compose up -d docker compose exec app php -v
Alpine apk
sudo apk update
sudo apk upgrade $(apk info | grep '^php83') # change 83 to your version
sudo rc-service php-fpm83 restartcPanel / WHM EasyApache 4
dnf upgrade 'ea-php83*' # one package set per version; CentOS 7: yum
/scripts/restartsrv_apache_php_fpmPlesk Plesk Installer
plesk installer update
plesk bin php_handler --list # or Tools & Settings → UpdatesWindows / IIS windows.php.net
# Download the fixed NTS zip for your branch from windows.php.net first. # Stop IIS, replace the PHP folder, keep your php.ini. iisreset /stop iisreset /start C:\PHP\php.exe -v
FrankenPHP, macOS not covered by apt or dnf
frankenphp version # install the new release or image brew update brew upgrade php@8.3 # not plain "php", which jumps branch brew services restart php@8.3
I am updating PHP to fix CVE-2026-109618 and CVE-2026-109619 and I must stay on my current branch ([8.x]). My system is [OS and install method from step 2]. I ran this command: [paste the command] and got this output: [paste the full output or error] Diagnose the cause from the output. Give me the smallest safe fix, one command at a time, and explain what each does. Warn me before anything that removes packages or changes repositories. If no fixed package exists yet for my source, tell me how to confirm that, and what to do in the meantime.
A running worker keeps the old PHP in memory until it restarts. Ubuntu and Debian backports keep their own version numbers, so check the changelog for the CVE IDs.
V=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;'); php -v zgrep -c 'CVE-2026-10961[89]' /usr/share/doc/php$V-common/changelog.Debian.gz # Debian/Ubuntu: 2 or more = patched rpm -q --changelog php-common 2>/dev/null | grep -c 'CVE-2026-10961[89]' # RHEL family sudo grep -lE ' /(usr|lib|opt).*\(deleted\)$' /proc/[0-9]*/maps # empty output = no old PHP still loaded
Help me confirm that my server is no longer vulnerable to CVE-2026-109618 and CVE-2026-109619. Fixed versions are 8.5.12, 8.4.27, 8.3.36 and 8.2.35, or a distribution package whose changelog lists both CVE IDs. Give me read-only commands to check every PHP install on this server, including PHP-FPM pools, Apache mod_php and containers, and to confirm no process still uses the old PHP files. Here is my output so far: [paste output]These are PHP's own interim measures. Each one cuts a specific attack path. None makes a server safe, and PHP says updating is the only safe choice. CERT-EU's advice for anyone who cannot patch is to take the site offline, or isolate it from public networks. Skip this step if step 4 passed.
| Measure | How | Limit |
|---|---|---|
| Remove PHP's memory limit | memory_limit=-1 where applications cannot override it: php_admin_value in the FPM pool or Apache config. Check that no pool, directory or app setting puts a finite limit back. | Incomplete. An underlying allocation failure can still reach the flaw. Needs a memory cap |
| Lower post_max_size | 8M if the app takes no uploads, 32M if it does. Keep upload_max_filesize below it. | Reduces the request size an attacker can send. Test uploads |
| Cap requests at the edge | At the WAF, load balancer (for example AWS ALB with AWS WAF) or nginx: decoded body size, input field count, multipart part count, header count and nesting depth. The limits must also cover requests with no usable Content-Length. | nginx alone can cap body and header size, not field or part counts. Use a WAF for those. |
| Add a container or cgroup memory limit | So one runaway request cannot exhaust the host once memory_limit=-1 is set. Prefer a policy that kills only the affected worker. ECS: the task or container memory limit. EC2 or VM with FPM: MemoryMax= on the FPM service. | Do not use RLIMIT_AS or RLIMIT_DATA. They can trigger the vulnerable failure. |
| Measure | How | Limit |
|---|---|---|
| Disable upload progress, server-side | session.upload_progress.enabled=0 in php.ini, the FPM pool or server config that applies before request parsing. Not ini_set(), not FPM .user.ini. Restart every worker. | Blocks the confirmed session paths, not other variants. |
| PHP 8.5 only: no fatal backtraces | fatal_error_backtraces=0, then restart every worker. | Blocks the confirmed backtrace path only. |
| Clean up per-request settings | Remove invalid or deprecated settings that emit diagnostics before initialization. Audit FPM pool php_value lines, .htaccess php_value and php_flag directives, and .user.ini files. | Hiding diagnostics with error_reporting, display_errors or @ does not help. |
| Fix the triggers | Fix attacker-reachable fatal errors and execution timeouts, including failures in callbacks, upload or import processing and cleanup. | A longer-term item for the development team. |
| Recycle workers from GHSA | pm.max_requests = 1 in the FPM pool, if performance allows. | Costs performance. Reduces, does not remove, the condition. |
V=$(php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;') sudo mkdir -p /etc/systemd/system/php$V-fpm.service.d printf '[Service]\nMemoryMax=2G\n' | sudo tee /etc/systemd/system/php$V-fpm.service.d/memory.conf sudo systemctl daemon-reload && sudo systemctl restart php$V-fpm systemctl show php$V-fpm -p MemoryMax # confirm; size to your server
; Set the memory cap (block above) BEFORE you apply this file. php_admin_value[memory_limit] = -1 ; only together with MemoryMax= or a container limit php_admin_value[post_max_size] = 8M ; 32M if the app takes uploads. Test an upload after. php_admin_value[upload_max_filesize] = 6M ; keep below post_max_size php_admin_value[session.upload_progress.enabled] = 0 php_admin_value[fatal_error_backtraces] = 0 ; PHP 8.5 only pm.max_requests = 1 ; if performance allows
# Set a memory cap on Apache first (systemd MemoryMax= on apache2 or httpd). php_admin_value memory_limit -1 php_admin_value post_max_size 8M php_admin_value upload_max_filesize 6M php_admin_flag session.upload_progress.enabled off
client_max_body_size 8m; # 32m if uploads; also applies to chunked bodies client_header_buffer_size 1k; large_client_header_buffers 4 8k; # Field, multipart part and nesting counts need a WAF rule (AWS WAF, Cloudflare, ModSecurity).
# Anything that sets memory_limit back to a finite value sudo grep -rnE 'memory_limit' /etc/php /etc/apache2 /etc/httpd /var/www 2>/dev/null # Per-request settings to review for invalid or deprecated keys sudo grep -rnE 'php_(admin_)?(value|flag)' /etc/php/*/fpm/pool.d /etc/apache2 /etc/httpd 2>/dev/null sudo find /var/www \( -name .htaccess -o -name .user.ini \) -exec grep -HnE 'php_(value|flag)|=' {} \; 2>/dev/null # Startup diagnostics, fatal errors and timeouts already in the logs sudo grep -hiE 'PHP (Deprecated|Warning): +(PHP Startup|Directive)|PHP Fatal error|Maximum execution time' \ /var/log/php*fpm*.log /var/log/apache2/error.log /var/log/httpd/error_log 2>/dev/null | sort | uniq -c | sort -rn | head -30
I cannot install the PHP fix for CVE-2026-109618 and CVE-2026-109619 on this server today. Help me apply PHP's interim measures from https://www.php.net/archive/2026.php#2026-10-21-5 safely, one change at a time:
For CVE-2026-109618: memory_limit=-1 set with php_admin_value so applications cannot override it (and check nothing sets a finite limit back); post_max_size 8M, or 32M if uploads are needed, with upload_max_filesize below it; request caps at the edge (body size, field count, multipart parts, headers, nesting depth, including requests without Content-Length); and a container or cgroup memory limit, such as systemd MemoryMax= on the FPM service or the ECS task limit. Never RLIMIT_AS or RLIMIT_DATA.
For CVE-2026-109619: session.upload_progress.enabled=0 in php.ini or the FPM pool (not ini_set or .user.ini); fatal_error_backtraces=0 if PHP 8.5; an audit of pool php_value lines, .htaccess php_value and php_flag directives and .user.ini files for invalid or deprecated settings; and a list of fatal errors and timeouts from my logs for the developers to fix.
Apply the memory cap before removing PHP's memory limit, never one without the other. Ask whether each site takes file uploads before you lower post_max_size, and have me test an upload afterwards. Restart every worker after each change and show me how to confirm it took effect. Then help me restrict access (VPN, IP allowlist or taking the site offline). Remind me these are partial and that updating is still required.
My setup: [OS, web server, PHP version, PHP-FPM or mod_php, hosted on EC2, ECS or other, does the site need file uploads?]The fix is in PHP, so a framework or CMS update will not fix this. Your framework version sets the highest PHP you can run, so check it first. Skip this step if you are on 8.2 or newer.
| Framework | Runs on PHP | Fix reachable | What to do |
|---|---|---|---|
| WordPress 6.9, 7.0 | up to 8.5 | Yes | Test plugins and themes on staging before you change branch. |
| WordPress 6.7, 6.8 | up to 8.4 | Yes | Move to 8.2, 8.3 or 8.4. Update core when you can. |
| Laravel 13, 12 | 8.2 to 8.5 | Yes | Patch PHP in place. Laravel 12 security fixes end 24 Feb 2027. |
| Laravel 11 | 8.2 to 8.4 | Yes | Laravel 11 lost security fixes on 12 Mar 2026. Plan the move to 13. |
| Laravel 10 | 8.1 to 8.3 | After PHP move | On 8.1? Move PHP to 8.3. No framework upgrade needed. |
| Laravel 9 and older | up to 8.2 | 8.2 only | Laravel 9 reaches 8.2 only (ends 31 Dec 2026). Plan a framework upgrade. |
| CodeIgniter 4.7 | 8.2 and up | Yes | Patch PHP in place. |
| CodeIgniter 3 | up to 8.1 | No fix | Official CI3 (3.1.13) stops at 8.1. Migrate to CI4, use the community fork pocketarc/codeigniter (third party, review first), or restrict access. |
php artisan --version # Laravel wp core version # WordPress, WP-CLI grep CI_VERSION system/core/CodeIgniter.php # CodeIgniter 3 composer show codeigniter4/framework # CodeIgniter 4
Ubuntu 22.04 (PHP 8.1): the cleanest move is a release upgrade to 24.04, which ships PHP 8.3 patched by Canonical. Take a snapshot first. Adding ondrej/php is faster but adds a third-party repository; check it serves a fixed build before you install.
My server runs PHP [8.1 or older] on [OS], which gets no fix from PHP for CVE-2026-109618 and CVE-2026-109619. My application is [WordPress / Laravel / CodeIgniter / other, with version]. Help me choose between: a vendor backport for my current version, adding a third-party repository for a newer PHP, or upgrading the operating system. Check what my framework supports first. Then walk me through the safest option one command at a time, with a backup or snapshot first and a rollback plan. Stop me if the newer PHP package is older than 8.5.12, 8.4.27, 8.3.36 or 8.2.35.
Patching closes the door. It does not remove anyone who already got in. Use read-only checks. If you find something, stop and call ONCyber before you clean up, so evidence is kept for your insurer.
ps -ef --forest | grep -A3 -E 'php-fpm|apache2|httpd' | grep -vE 'php-fpm|apache2|httpd|grep' # children of PHP workers; expect none
sudo find /var/www -name '*.php' -newermt '2026-10-20' -printf '%TY-%Tm-%Td %TH:%TM %p\n' | sort
sudo grep -hiE 'out of memory|segfault|exited on signal' /var/log/php*fpm*.log /var/log/apache2/error.log 2>/dev/null | tail -50
sudo ss -tnp | grep -E 'php|apache|httpd'Help me check this web server for signs that CVE-2026-109618 or CVE-2026-109619 was exploited since 20 October 2026. Use read-only commands only. Do not delete, move or change anything. Look for: shells or download tools started by php-fpm, httpd or apache2; new or changed PHP files in web roots, especially obfuscated ones; PHP worker crashes or out-of-memory errors; unusual outbound connections from the web server. If anything looks suspicious, tell me to stop and contact my security provider before cleaning up, so evidence is preserved. My setup: [OS, web server, web root paths]If a site could stop during the work, tell customers before it starts. Send a "resolved" note when it is done. Remove interim measures from step 5 only after step 4 passes. Then review the ONCyber scan report.
Write a short, calm email to our customers about a security maintenance window on [service] on [date and time, time zone] for up to [duration]. Reason: a critical security update to PHP, a component our website uses. State only facts: no evidence that customer data is affected [change if not true], no action needed from them, when the next update comes, and how to reach us at [contact]. Plain language, no technical jargon, no fear, under 150 words.
Confirmed by PHP on 21 October
- Unauthenticated remote code execution through normal web requests.
- Fixed in 8.5.12, 8.4.27, 8.3.36 and 8.2.35.
- Linux distributions got the patches in advance.
- The Remi repository has no update today.
- PHP published source backports for 7.4, 8.0 and 8.1.
Still open as of 21 Oct, 10:45 ET
- How wide the attacks are. Cloudflare sees early attacks; the ACSC says it is not aware of active exploitation. Assume probing.
- Public exploit code: claimed, unverified. Some repositories are lures. Do not run them.
- CISA KEV listing: not yet.
- Exactly which versions below 8.2 are affected. CERT-EU says assume PHP 5 onward.
- PHP security advisory, 21 October 2026 and release notes for 8.5.12, 8.4.27, 8.3.36, 8.2.35
- GHSA-w8hw-w9fx-j79w and GHSA-6wmf-4rv5-p3rp
- Reuters: EU agency warns websites may need to be taken offline · The Next Web
- Tenable php2shell FAQ · ma.ttias.be patch guide
- WordPress PHP compatibility · Laravel support policy · PHP supported versions