/security:php2shell-checkfrom security
Checks PHP installations for the critical php2shell vulnerabilities (CVE-2026-109618, CVE-2026-109619) by scanning binaries, project configs, and ini stopgaps. Provides a fix plan for affected web SAPIs.
Ships in security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
php2shell is two critical bugs in PHP's request handling, disclosed and fixed on 2026-10-21 (CVSS v4.0 9.2 each):
fatal_error_backtraces) and PHP-FPM via session upload progress, which is on by default. No app code needed.Every web SAPI is affected (FPM, mod_php, php-cgi, FrankenPHP, LiteSpeed). CLI-only use is not the attack surface. Exploit attempts were seen on 2026-10-21 (Cloudflare, watchTowr). Not in CISA KEV as of 2026-10-21.
Sources: php.net, the two GitHub advisories above, NCSC, CERT-EU 2026-018.
Run on the machine (or inside the container) that serves PHP, from the project root. SKILL_DIR is the folder holding this SKILL.md; use the script's full path so --repo defaults to the project, not the skill folder:
sh "$SKILL_DIR/scripts/check.sh" # binaries + repo in cwd + ini stopgaps
sh "$SKILL_DIR/scripts/check.sh" --repo ./app # scan another project dir
sh "$SKILL_DIR/scripts/check.sh" --php /usr/sbin/php-fpm8.2 # one binary only
sh "$SKILL_DIR/scripts/check.sh" --version 8.4.26 # judge a version string
sh "$SKILL_DIR/scripts/check.sh" --url https://your-own-site.example # X-Powered-By only
sh "$SKILL_DIR/scripts/check.sh" --json # machine-readable
docker run --rm your-image php -v # containers: check the image, not the host
Without --repo, a run from $HOME or / skips the project scan instead of walking the whole folder.
Exit codes: 0 all patched, 1 any vulnerable, 2 unknown or nothing found, 3 backport possible only.
The script is read-only and works offline: php -v (frankenphp version), php -r ini_get(...), dpkg -S/rpm -qf/apk ownership queries, installed package changelogs, and with --url one HEAD request. It sends no exploit payloads. When a Debian/Ubuntu image has no changelog under /usr/share/doc, the verdict stays BACKPORT-POSSIBLE; check the vendor advisory.
| Verdict | Meaning | Do |
|---|---|---|
PATCHED | At or above the fix for its branch (8.2.35, 8.3.36, 8.4.27, 8.5.12, 8.6.0RC4, 8.6+). RC and -dev builds of a fix release (8.4.27RC1) are not | Confirm workers were restarted after the upgrade |
PATCHED-BACKPORT | Distro package below the upstream number whose changelog lists CVE-2026-109618 | Restart workers; done |
BACKPORT-POSSIBLE | Debian/Ubuntu/RHEL-family package on 7.4-8.5 below the fix, no CVE in its changelog yet (Alpine and 5.x-7.3 packages stay VULNERABLE) | Update the package, check the vendor advisory, rerun |
VULNERABLE | Below the fix with no package evidence, any 7.4/8.0/8.1 build without a vendor backport, or 5.x-7.3 (EOL, no fix exists) | Follow the fix plan now |
FLOATING | Docker tag or .php-version without a patch level (php:8.4-fpm, php:8.6-rc-fpm) | Rebuild with --pull --no-cache, pin an exact fixed tag |
UNKNOWN | No version found, or a branch-only string | Run where PHP actually serves, or pass --php / --version |
INFO | composer.json and CI setup-php hints | composer.lock and require.php never reveal the runtime; this is a runtime bug, not a package |
Distro and LTS packages keep the OLD upstream version string after a backport (for example 8.2.7-1~deb12u2), so a low number from dpkg/rpm is not proof of exposure; the changelog check settles it. A hidden X-Powered-By header is not proof of safety.
Upgrade, then restart every PHP worker (FPM pools, Apache with mod_php, FrankenPHP, LiteSpeed). A reload that keeps old workers alive is not enough.
| Branch | Target |
|---|---|
| 8.5 | 8.5.12 |
| 8.4 | 8.4.27 |
| 8.3 | 8.3.36 |
| 8.2 | 8.2.35 |
| 8.6 pre-release | 8.6.0RC4 or later |
| 7.4, 8.0, 8.1 | No official release. Use your distro/LTS vendor's patched package or the PHP security team's source backports; plan a move to 8.2.35+ |
| 5.x-7.3 | EOL, no fix. Upgrade to a supported branch or isolate the host |
Check your distro's security tracker for CVE-2026-109618 and CVE-2026-109619 before trusting a package.
apt update && apt install --only-upgrade 'php*'. Sury repo users: update from packages.sury.org.apt update && apt upgrade.dnf upgrade 'php*'. Remi users: update the php* SCL or module stream.apk upgrade.brew update && brew upgrade php (or [email protected]), then brew services restart php.php:8.5.12-*, php:8.4.27-*, php:8.3.36-*, php:8.2.35-* (fpm, apache, cli, alpine variants), rebuild with docker build --pull --no-cache, redeploy. Pin by digest too if you like; the script still reads the tag in php:8.4.27-fpm@sha256:....CVE-2026-109618:
memory_limit = -1 via php_admin_value in the FPM pool or Apache vhost.post_max_size = 8M if the app takes no uploads, 32M if it does; upload_max_filesize below post_max_size.RLIMIT_AS / RLIMIT_DATA limits.CVE-2026-109619:
session.upload_progress.enabled = 0 in php.ini or FPM pool php_admin_value (not ini_set or .user.ini).fatal_error_backtraces = 0.pm.max_requests = 1 where performance allows.The script reads these through the CLI binary and labels them cli ini only; FPM and Apache can load a different ini (Debian's CLI php.ini ships memory_limit = -1), so check the pool config and vhost too.
--url sends one HEAD request; never point it at someone else's site.composer audit and dependency scanners will not flag this. Check the runtime.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub anton-abyzov/vskill --plugin securityOther plugins' skills for the same job