CVE-2019-11043 PHP-FPM + nginx PATH_INFO underflow RCE — a misconfigured nginx fastcgi_split_path_info regex lets a newline in the URL zero out PATH_INFO, corrupting FPM memory so FCGI vars can be injected (PHP_VALUE) to execute code. Tier 2 (memory-corruption, can crash workers — gated). Use on nginx+php-fpm targets.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Php Fpm Pathinfo?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-php-fpm-pathinfo)
---
name: php-fpm-pathinfo
description: CVE-2019-11043 PHP-FPM + nginx PATH_INFO underflow RCE — a misconfigured nginx fastcgi_split_path_info regex lets a newline in the URL zero out PATH_INFO, corrupting FPM memory so FCGI vars can be injected (PHP_VALUE) to execute code. Tier 2 (memory-corruption, can crash workers — gated). Use on nginx+php-fpm targets.
---
# php-fpm / nginx PATH_INFO RCE (CVE-2019-11043)
A regex quirk in common nginx configs lets a crafted URL set `PATH_INFO` to empty, triggering an underflow in php-fpm's `env_path_info` handling. The attacker then smuggles FastCGI variables (`PHP_VALUE`) to run arbitrary PHP → RCE.
## Trigger phrases
`php-fpm, cve-2019-11043, path_info, fastcgi, nginx php rce, fpm underflow, fastcgi_split_path_info`
## Execution gate (Tier 2 — memory-corruption / crash-risky)
Ask (a) "lab/authorized to run the exploit (may crash/restart php-fpm workers)?" → if yes, run the PoC. If no, (b) "detection only (version + config fingerprint, no memory-corruption exploit)?" → if yes, stop at fingerprinting. Record answers in `./.zazy/scope.md`.
## Preconditions
nginx forwarding to php-fpm with a vulnerable pattern — typically `fastcgi_split_path_info ^(.+?\.php)(/.*)$;` + `fastcgi_param PATH_INFO $fastcgi_path_info;` and `try_files`/direct `.php` location WITHOUT verifying the file exists. PHP before **7.1.33 / 7.2.24 / 7.3.11** (fix in those releases).
## Method
1. **Fingerprint:** confirm nginx + php-fpm (`Server: nginx`, `X-Powered-By: PHP/x`); get PHP version (`vulnerable-components`); identify a reachable `.php` path.
2. **Detection (safe-ish):** the exploit probes offsets by appending `%0a` (newline) after the `.php` path and watching response-code/length changes across a range — this is how `phuip-fpizdam` finds the vulnerable offset. Even detection pokes FPM; keep within the gate.
3. **Exploit (gated):** run the public tool:
```
go run phuip-fpizdam "http://TARGET/index.php"
```
On success it reports a usable offset and enables code exec via injected `PHP_VALUE` (`auto_prepend_file`/`allow_url_include`). Then:
```
curl "http://TARGET/index.php?a=id" -H 'User-Agent: ...' # runs injected PHP
```
Prove with a benign command + OAST; avoid repeated runs that may crash workers.
## Modern / rare techniques
- Works even when the `.php` target returns 404 for the base path, because the bug is in var handling not file existence.
- Offset is environment-dependent; the tool brute-forces it — note the exact offset in evidence for reproducibility.
## Bypass / evasion
Primarily a config/version issue; vary the probed `.php` endpoint if WAF blocks `%0a`. `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`.
## Escalation / chaining
RCE as the php-fpm user → reverse shell → `linux-privesc`; secret/config read → `database-enumeration`, `cloud-pentest`.
## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike). Tool: `phuip-fpizdam` (neex); `nuclei -id CVE-2019-11043`. See `zazy-orchestrator`.
## Verification (background, before reporting)
Confirm exec with a benign command and OAST callback; reproduce using the recorded offset. For detection-only runs, report the vulnerable config+version as a likely finding, not confirmed-RCE. Report true positives only.
## Evidence
PHP version, nginx config pattern (if obtainable), the working offset, PoC request + benign command output / OAST hit. Remediation: upgrade PHP to a fixed release; fix nginx (`try_files $uri =404;` before passing to FPM, validate `.php` existence); drop the fragile `fastcgi_split_path_info` pattern.