Home › The Stash

PHP2Shell and HTTP2Shell: Is Your Server Patched? 6 Checks (Tested)

LabOctober 29, 2026

BeginnerTestedTime ~15 minTool php, dpkg, dockerNeeds a Linux server or Lab 00Cost freeExam Sec+ 4 · CySA+ 2

0 / 6 steps

The goal

In the week of 21 October 2026, two families of remote-code-execution flaws landed at once: PHP2Shell in PHP itself, and HTTP2Shell (also called Node2Shell) in the Brotli decompression library used by Node.js, Python, .NET and more. Both are on CISA’s list of vulnerabilities being exploited in real attacks. This lab is the calm version: six checks, run on your own server, that tell you whether you’re patched — including the trap that makes a patched Ubuntu server look vulnerable.

Checking only. Everything here reads versions and settings on machines you own or run. Nothing sends an exploit or touches anyone else’s server. If a check says you’re behind, the fix is an update from your vendor or host.

The fixes, in one table. If your versions are at or above these, you’re patched for the main bugs.

Flaw What it is Fixed in
PHP2ShellCVE-2026-109618, -109619 Remote code execution in PHP, no login needed. On CISA’s exploited list 26 Oct. PHP 8.5.12, 8.4.27, 8.3.36, 8.2.35 (21 Oct). No fix for 8.1 or older: upgrade.
Third PHP flawCVE-2026-115560 Needs the session upload progress feature switched on (it is, by default). No patch yet. Turn the feature off (step 3).
HTTP2Shell / Node2ShellCVE-2026-111497 Out-of-bounds write in Google’s Brotli decoder, reachable by sending compressed (Content-Encoding: br) data. On CISA’s list 27 Oct. Brotli 1.0.10, 1.1.1, 1.2.1; Node.js 22.23.4, 24.22.1, 26.12.1; Python brotli 1.2.1

Three critical bugs in one week, all named like rejected movie villains. I’ve never been so proud of an industry. — Nyx

Before you start. Run the Linux checks on your own server, or on the Ubuntu VM from Lab 00 with sudo apt install php8.3-cli to practise. Step 4 is for WordPress sites on shared hosting, where you can’t run commands at all.

Steps

01Find your PHP version

# php -v
PHP 8.3.6 (cli) (built: Oct 19 2026 15:16:58) (NTS)

Reading it. 8.3.6 looks hopeless next to the fixed 8.3.36. On Ubuntu, it isn’t. Linux distributions keep the version number their release shipped with and backport security fixes into it, so the number on its own tells you almost nothing. Notice the build date too: 19 October, two days before the official PHP release, because distributions get fixes under embargo. Advice like “make sure your build is from 21 October or later” would wrongly flag this server. The next step is the real test.

02Check the changelog, not the number

Every Debian or Ubuntu package ships a changelog. If the fix is in, the CVE number is in there.

# dpkg -s php8.3-cli | grep ^Version
# zgrep -E "CVE-2026-109618|CVE-2026-109619" /usr/share/doc/php8.3-cli/changelog.Debian.gz
Version: 8.3.6-0ubuntu0.24.04.13
    - debian/patches/CVE-2026-109618_109619.patch: Avoid state corruption via
    - CVE-2026-109618
    - CVE-2026-109619

Reading it. Both CVE numbers are listed against -0ubuntu0.24.04.13: this server is patched, whatever php -v says. No output means the fix isn’t installed yet: run sudo apt update && sudo apt upgrade, then restart PHP (sudo systemctl restart php8.3-fpm or apache2). Change 8.3 to your version. On Red Hat-family systems the same idea is rpm -q --changelog php | grep CVE-2026-109618 (not tested here). If you installed PHP from php.net or a third-party repository, the version number is meaningful: compare it with the table.

03Switch off the feature the unpatched flaw needs

The third flaw has no patch yet, and it only works if session upload progress is on. Almost no site uses it, and it’s on by default.

# php-fpm8.3 -i | grep upload_progress.enabled
# echo "session.upload_progress.enabled = Off" | sudo tee /etc/php/8.3/fpm/conf.d/99-php2shell.ini
# php-fpm8.3 -i | grep upload_progress.enabled
# sudo php-fpm8.3 -t && sudo systemctl restart php8.3-fpm
session.upload_progress.enabled => On => On
session.upload_progress.enabled = Off
session.upload_progress.enabled => Off => Off
NOTICE: configuration file /etc/php/8.3/fpm/php-fpm.conf test is successful

Reading it. A small file in conf.d overrides the setting without editing php.ini, so a future PHP update won’t undo it. -t checks the configuration before the restart, so a typo can’t take the site down. Using Apache’s mod_php instead of PHP-FPM? Put the same file in /etc/php/8.3/apache2/conf.d/ and restart apache2. The command-line PHP has its own folder (cli/conf.d); it doesn’t serve web pages, so it matters less.

04WordPress on shared hosting: check without a terminal

Most WordPress sites can’t run any of the above. In your WordPress admin, go to Tools → Site Health → Info and open Server.

stashgrid.ai, 29 Oct 2026
Web server = Apache
PHP version = 8.5.12 (Supports 64bit values)
PHP SAPI = cgi-fcgi

Reading it. That’s this site: PHP 8.5.12, exactly the fixed release, so our host had already patched it. On shared hosting the host maintains PHP, and the version shown is usually upstream PHP, so compare it straight against the table. Two things people get wrong: updating WordPress, plugins or themes does not fix PHP2Shell (the bug is underneath them), and a site on PHP 8.1 or older will never get a fix, so switch to a supported PHP version in your hosting control panel. You can’t usually see the upload-progress setting from here: if in doubt, ask your host whether they’ve applied PHP’s mitigation for CVE-2026-115560.

05HTTP2Shell: check Brotli

The Brotli bug lives in a shared library, so one package update fixes every program that uses it. Check it the same way as PHP:

# dpkg -l "libbrotli*" | grep ^ii
# zgrep CVE-2026-111497 /usr/share/doc/libbrotli1/changelog.Debian.gz
ii  libbrotli1:amd64 1.1.0-2ubuntu0.1 amd64        library implementing brotli encoder and decoder (shared libraries)
    - debian/patches/CVE-2026-111497.patch: Detect and report invalid stream
    - CVE-2026-111497

Reading it. Patched. The catch is that many programs bundle their own copy of Brotli instead of using the system one, and the system update doesn’t touch those: Node.js (check node --version against the table), the Python brotli package (pip show brotli, needs 1.2.1), .NET, Envoy and Istio, Bun, and anything compiled into a single binary. Those each need their own update.

06Containers: check inside the image, not the tag

A container carries its own Node.js and libraries. The tag name (node:24-slim) stays the same while the contents change, so ask the image itself:

# docker pull node:24-slim
# docker run --rm node:24-slim node --version
v24.22.2

Reading it. 24.22.2 is newer than the fixed 24.22.1, so a freshly pulled image is safe. The risk is the old copy already on your server: a container started last month keeps running last month’s Node until you pull and recreate it (docker compose pull && docker compose up -d). Images you build yourself need rebuilding too. A software bill of materials (SBOM) made before 21 October will list the old versions.

What you learned

  • PHP2Shell — fixed in PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35; 8.1 and older will never be fixed
  • Distro versions lie (politely) — Ubuntu’s 8.3.6 can be fully patched; the package changelog naming the CVE is the proof
  • No patch yet? — switch off session.upload_progress.enabled with a conf.d file, test, restart
  • Shared hosting — Site Health shows your PHP version; WordPress and plugin updates don’t fix PHP itself
  • HTTP2Shell — update the system Brotli library, then every bundled copy: Node.js, Python packages, containers

Tried it? Tell us

Nova put this together from Steven’s saved news, and we ran every command above before publishing. If your system shows something different, or a newer fix changes the picture, tell us.

NextMake your server check itself every morning→

Go deeper

Original walkthrough, 29 Oct 2026. Steps 1–3 and 5 were run in a fresh Ubuntu 24.04 container (php8.3 8.3.6-0ubuntu0.24.04.13, libbrotli1 1.1.0-2ubuntu0.1); step 6 with the official node:24-slim image; step 4 is this site’s own Site Health page. Fixed versions are from the PHP release of 21 October, the Brotli and Node.js advisories, and CISA’s catalog (log timestamps removed), as reported by the sources above. This is a fast-moving story: if a version here is out of date, tell me and I will fix it.