psf-php2shell-edge-test(8)
PHP2Shell edge guard tester (v1)
CVE-2026-109618 / CVE-2026-109619
If this software is helpful, consider a donation to our 501c3 nonprofit:
https://privacysafe.foundation
Checks that an edge guard from this folder (the Apache .conf, the Apache
.htaccess or the nginx snippets) behaves the way you think it does on a given
URL. It sends a handful of small, benign requests (a form field named "a"
with the value "b", never exploit content) and reads the status codes. It
needs only bash and curl, and nothing on the server being tested.
A pass here shows the tested URL behaves as described. It does not show a
server is safe from either CVE, does not cover other paths or virtual hosts,
and cannot tell which component refused a request. Patching PHP is the fix.
Usage:
./php2shell-edge-test.sh [options] URL
--expect MODE block (default) the guard is enforcing: a multipart
POST to URL must get 403
dry-run the .htaccess dry run: a multipart POST must NOT
get 403 and must carry X-PHP2Shell-Guard
log-only the .conf or nginx log-only mode: a multipart
POST must NOT get 403 (add --log FILE to also
confirm the guard logged it)
--allow PATH a path on your allowlist (for example /wp-admin/async-
upload.php). A multipart POST to it must NOT get 403, and
one to PATH.bak must get 403 when enforcing
--log FILE a log the guard writes to; used with --expect log-only
--host NAME send this Host header (the URL may be 127.0.0.1)
--insecure do not verify a TLS certificate
-h, --help, versionThe Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.