
Script que detecta si tu versión de PHP es vulnerable a PHP2Shell (CVE-2026-109618 / 109619)
CLI detector for the PHP2Shell vulnerability (
CVE-2026-109618/CVE-2026-109619) in local PHP installations.
PHP2Shell is the name researchers gave to two critical unauthenticated remote code execution (RCE) vulnerabilities in the PHP interpreter, disclosed on October 21, 2026 with a CVSS v4.0 score of 9.2 (Critical). It affects PHP from version 5.4.0 onward and has no partial mitigation: only patching.
This script checks the locally installed PHP version and tells you:
full mode)Compares the version number of your php from PATH against the official patch table (8.5.12, 8.4.27, 8.3.36, 8.2.35).
python3 php2shell_check_v_1.0.py
In addition to the version, it parses the build date and compares it against the date of the official advisory. It detects when your distro backported the patch without bumping the version number (typical in Debian/Ubuntu/RHEL).
python3 php2shell_check_v_1.0.py --mode full
Specify a specific binary when you have several PHP installations or the one in PATH is not the one serving the website.
python3 php2shell_check_v_1.0.py --php /usr/bin/php8.2
python3 php2shell_check_v_1.0.py --php /usr/bin/php8.2 --mode full
| Code | Meaning |
|---|---|
0 | Not vulnerable |
1 | Vulnerable |
2 | PHP not detected |
3 | Unknown PHP branch |
4 | Probable backport (mode full) |
full with backport) ____ __ ______ ___ _____ __ ____
/ __ \/ / / / __ \__ \/ ___// /_ ___ / / /
/ /_/ / /_/ / /_/ /_/ /\__ \/ __ \/ _ \/ / /
/ ____/ __ / ____/ __/___/ / / / / __/ / /
/_/ /_/ /_/_/ /____/____/_/ /_/\___/_/_/
==================================================================
Detector de vulnerabilidad PHP2Shell
CVE-2026-109618 / CVE-2026-109619 | CVSS v4.0: 9.2 (Critical)
==================================================================
made by Pr@fEsOr X
[*] Modo: full
[*] Detectando interprete PHP local...
[*] Binario: php
[*] Version: 8.5.11
[*] Build: 2026-10-22 14:00:00 UTC
[BACKPORT?] Version dice vulnerable, build posterior al parche.
Tu distro probablemente backporteo sin subir version.
php.net sugiere: 8.5.12
Build: 2026-10-22 14:00 UTC >= parche: 2026-10-21 14:00 UTC
Confirma con tu distro o phpinfo().
[VULNERABLE] Actualiza YA, existe parche oficial.
Sube a 8.5.12 o superior.
Reinicia php-fpm / Apache / FrankenPHP / LiteSpeed despues.
The script does not inspect the binary or launch a PoC. What it does:
php -v and captures the output.PHP 8.5.11 → (8, 5, 11) tuple(built: Oct 22 2026 14:00:00) → datetimeversion mode: compares the tuple against a hardcoded table of patched versions (PATCHED = {8.5: (8,5,12), 8.4: (8,4,27), 8.3: (8,3,36), 8.2: (8,2,35)}).full mode: also compares the build date against PATCH_RELEASE = 2026-10-21 14:00 UTC (date of the official advisory). If the build is later than the patch but the version still says vulnerable → your distro backported it.| Version | Mode | Build date | Result |
|---|---|---|---|
| 8.5.12+ | any | any | safe |
| 8.5.11 | version | (ignored) | vulnerable |
| 8.5.11 | full | before Oct 21, 2026 | vulnerable |
| 8.5.11 | full | after Oct 21, 2026 | backport |
| 8.1.30 | version | (ignored) | eol_vulnerable |
| 8.1.30 | full | after Oct 21, 2026 | backport |
| 5.3.29 | any | any | unaffected |
It is detection based on binary metadata, not on code inspection. It works quickly, without privileges and without risk, but it depends on the version and build date being honest.
Pr@fEsOr X
MIT License — see LICENSE.