Skip to content
Back to skills

Php Fpm Pathinfo

ASecurity

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.

  • 16 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 17, 2026
securitygophpshelldatabasebackend

Works with

  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill php-fpm-pathinfo --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Php Fpm Pathinfo?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Php Fpm Pathinfo
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-php-fpm-pathinfo/badge)](https://www.skillsdirectory.com/skills/anandjogawade-php-fpm-pathinfo)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.