Response Centre · Critical, CVSS v4 9.2

Is your server open to php2shell? Check and fix it free.

CVE-2026-109618 · CVE-2026-109619 · Fixed upstream 21 Oct 2026 · Last reviewed:

What happened

Two flaws in PHP itself let an attacker run code on a web server without logging in. One corrupts memory when PHP runs out of memory; the other reuses state left over from an earlier request. Every PHP installation that serves web requests is exposed until it runs PHP 8.2.35, 8.3.36, 8.4.27 or 8.5.12 or later. PHP 8.1 and older get no fix.

Check a website

We load the home page once and read the PHP version the server announces. No attack traffic.

Check a version

Paste the output of php -v, or the version your host shows. Nothing is sent anywhere.

Fixed versions

Update to one of these, or later

Step 1

Check the server itself

A website check only sees what the server announces. These commands give a definite answer. Read them before you run them: they only print, they change nothing.

  1. 1Is this server patched? Run on the server

    Prints the PHP version and the verdict. Uses the same fixed versions as this page.

    php -r '$f=["8.2"=>"8.2.35","8.3"=>"8.3.36","8.4"=>"8.4.27","8.5"=>"8.5.12"];$b=PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;$v=PHP_VERSION;echo "PHP $v: ",isset($f[$b])?(version_compare($v,$f[$b],">=")?"PATCHED":"VULNERABLE, update to ".$f[$b]):(version_compare($v,"8.6",">=")?"newer than affected branches":"NO UPSTREAM FIX, upgrade to 8.2.35+ or check your distro"),PHP_EOL;'
  2. 2Check every PHP on the box, not just the command line

    PHP-FPM and php-cgi can be a different version from `php`. Also lists Apache's PHP module and PHP inside running containers.

    for b in $(ls /usr/bin/php* /usr/sbin/php-fpm* /usr/local/bin/php* /usr/local/sbin/php-fpm* /opt/*/root/usr/sbin/php-fpm 2>/dev/null | grep -E '(php|php-fpm|php-cgi)[0-9.]*$'); do echo "$b: $($b -v 2>/dev/null | head -1)"; done
    apache2ctl -M 2>/dev/null | grep -i php; httpd -M 2>/dev/null | grep -i php
    docker ps --format '{{.Names}}' 2>/dev/null | while read c; do echo "$c: $(docker exec "$c" php -v 2>/dev/null | head -1)"; done
  3. 3On Debian, Ubuntu, RHEL, Alma or Rocky packages: look for the CVE in the changelog

    Distributions backport fixes without changing the version number, so the number alone can mislead. If the CVE is listed, that package is fixed.

    apt changelog "$(dpkg -S "$(readlink -f "$(command -v php)")" | cut -d: -f1)" 2>/dev/null | grep -m2 -E 'CVE-2026-10961[89]'
    rpm -q --changelog php-common 2>/dev/null | grep -m2 -E 'CVE-2026-10961[89]'

Step 2

Patch it

Pick your platform. Restart PHP after updating: a running worker keeps the old code until it restarts.

›Ubuntu / Debian (incl. the Ondřej Surý PPA)
  1. Update every PHP package and restart

    sudo apt update && sudo apt install --only-upgrade 'php*'
    sudo systemctl restart 'php*-fpm' apache2 2>/dev/null; sudo systemctl restart php-fpm httpd 2>/dev/null; true
  2. Confirm with the changelog check above. If your release has no fixed package yet, use the stopgaps below until it does.

›RHEL / AlmaLinux / Rocky / Fedora
  1. Update every PHP package and restart

    sudo dnf upgrade 'php*'
    sudo systemctl restart 'php*-fpm' apache2 2>/dev/null; sudo systemctl restart php-fpm httpd 2>/dev/null; true
  2. On Remi's repository: PHP warned there would be no Remi updates on 21 Oct 2026. Check rpms.remirepo.net, or move to distribution packages or a source build.

›cPanel / WHM (EasyApache 4)
  1. Update the EasyApache PHP packages and restart PHP-FPM and Apache

    sudo dnf upgrade 'ea-php*' || sudo yum update 'ea-php*'
    sudo /scripts/restartsrv_apache_php_fpm; sudo /scripts/restartsrv_httpd
  2. In WHM, MultiPHP Manager: move every account off PHP 8.1 and older. There is no fix for those versions.

›Plesk
  1. Install the updated PHP handlers

    Or Tools & Settings › Updates in the panel.

    sudo plesk installer --select-product-id plesk --select-release-current --upgrade-installed-components
  2. In each domain's PHP settings, switch any site on PHP 8.1 or older to 8.2 or newer.

›Docker / Kubernetes
  1. Pin the patched tag, rebuild without cache, and redeploy every service built on it

    # Dockerfile
    FROM php:8.4.27-fpm   # or 8.5.12 / 8.3.36 / 8.2.35, same variant you use now
    
    docker build --pull --no-cache -t yourapp:patched .
    # then roll out; restarting an old image does NOT patch it
  2. Images built on a distribution PHP (apt or dnf inside the Dockerfile) need a rebuild too.

›Shared hosting (Hostinger, GoDaddy, Bluehost and others)
  1. In your hosting panel's PHP version selector, choose the newest PHP your app supports (8.2 or newer).

  2. Ask your host in writing whether their PHP builds include the fixes for CVE-2026-109618 and CVE-2026-109619. If they still run PHP 8.1 or older for you, move.

›Windows / IIS / XAMPP / WAMP
  1. Download the patched build from windows.php.net, replace the PHP folder (keep your php.ini), then restart

    iisreset
  2. XAMPP and WAMP bundles lag behind PHP releases: replace the bundled PHP folder, or do not expose these to the internet.

›macOS (Homebrew, developer machines)
  1. Upgrade PHP

    brew update && brew upgrade php

Can't patch today?

Stopgaps until you can

These reduce the risk. They are not a fix.

  1. If you cannot patch today, take the site offline or behind a firewall

    This is CISA's advice, and the only stopgap that removes the risk. Everything else on this list reduces it; none of it is a fix.

  2. Turn off session upload progress

    Set it in php.ini or the PHP-FPM pool, then restart all workers. ini_set() and .user.ini are too late.

    session.upload_progress.enabled = 0
  3. On PHP 8.5, turn off fatal error backtraces

    fatal_error_backtraces = 0
  4. Cap request bodies

    If the site takes no uploads, 8M; otherwise 32M with upload_max_filesize below it. Block multipart requests at the web server or WAF if your app does not use them.

    post_max_size = 8M
  5. Put a WAF in front (Cloudflare, AWS WAF, Cloud Armor and others)

    Reject request bodies larger than the WAF can inspect: these attacks use large payloads to exhaust memory.

  6. Do not rely on container memory limits, RLIMIT_AS or RLIMIT_DATA

    They do not block the attack and can trigger the vulnerable path.

Step 3

Were you already hit?

Patching closes the door. It does not remove anyone who came in before.

  1. PHP or web server workers that started a shell or a download tool

    This is the sign CISA asks you to watch for.

    ps -eo pid,ppid,user,etime,cmd --forest | grep -A3 -E 'php-fpm|php-cgi|apache2|httpd|lsphp|frankenphp' | grep -E '\b(sh|bash|dash|curl|wget|nc|ncat|python3?|perl)\b'
  2. PHP files created or changed since the bug leaked

    sudo find /var/www /home/*/public_html -name '*.php' -newermt '2026-10-19' -ls 2>/dev/null
  3. Executables dropped in temp folders

    sudo find /tmp /var/tmp /dev/shm -type f -perm -u+x -ls 2>/dev/null
  4. Unexpected outbound connections from the web user

    sudo ss -tnp | grep -E 'php|apache2|httpd|lsphp'
  5. Clean logs do not prove you are safe

    If anything above looks wrong, do not wipe the server: take a snapshot first, then talk to an incident responder. Under the CERT-In directions of 28 April 2022, reportable incidents, including unauthorised access to IT systems and attacks on servers, must be reported to CERT-In within 6 hours of noticing them.

Stuck, or think you have been breached?

Message our cyber experts on WhatsApp. If something above looked wrong, do not wipe the server first: evidence matters for recovery, for CERT-In and for a police complaint.

FAQs

Yes. The website check, the version checker, the commands and the patch steps are free, need no sign-up, and show the result on screen.

It loads your home page once, like a browser, and reads the PHP version the server already announces in its response headers. It sends no attack traffic and does not test the flaw itself, so it is safe to run on any site. Many servers hide their version; then run the one-line command on the server instead.

No. The flaw is in PHP, the language runtime under WordPress, not in WordPress. You, or your host, must update PHP itself and restart it.

PHP publishes no release for 8.1 or older, but distributions such as Ubuntu and Debian may backport the fix into their own packages. Run the changelog command: if CVE-2026-109618 and CVE-2026-109619 are listed, that package is fixed. If not, upgrade or apply the stopgaps.

As of 21 Oct 2026 CISA had not seen exploitation. Researchers have reproduced remote code execution, and a public exploit is expected soon. Patch now; do not wait for one.

Primary sources

Where these rules come from

Last reviewed 22 Oct 2026. The check reads public response headers only and is an indication, not a guarantee. If anything here differs from the vendor advisory, the advisory prevails.