CVE-2026-84317
Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)
Archived. This CVE has left SubZer0's live 30-day window. Signals below are as of 2026-11-14; check the references for anything newer.
- Severity: High
- CVSS 8.8
- EPSS 0.48%
- Public exploit
- P2 · This week
Why P2: this week.
Description
## Summary `internal/config/validation.go` (`ValidateConfigFile`) is a security control that blocks dangerous nginx directives — `js_*`, `perl_*`, `load_module` of the njs/perl modules, and `user root`. It is enforced on three of the four config-write paths: `api/config/add.go`, `api/config/modify.go`, and `mcp/config/config_modify.go`. The fourth path — the MCP tool `nginx_config_add` (`mcp/config/config_add.go`) — does NOT call it: it writes the caller-supplied `content` straight to disk and reloads nginx. An authenticated MCP caller (or an MCP agent induced via prompt injection) can therefore inject exactly the directives the control is meant to block, leading to nginx code execution on deployments where the njs/perl module is available (e.g. the official Docker image). ## Root cause — an incomplete hardening patch Commit `3e411d38` ("Harden config write paths", 2026-04-21) introduced `ValidateConfigFile` and wired it into the config-write paths — but its changeset touched only: api/config/add.go (+6), api/config/modify.go (+8), internal/config/validation.go (+199), mcp/config/config_modify.go (+5) It did NOT touch `mcp/config/config_add.go`. So the MCP add path was left without the validation that all of its sibling paths received. `config_add.go` has never called `ValidateConfigFile` (verified via git history); this is an oversight in the hardening, not a regression. ## Affected code (mcp/config/config_add.go, handleNginxConfigAdd) ```go content := mcp.GetString(a…
Affected products
- go github.com/0xJacky/Nginx-UI < 1.9.10-0.20260703131214-23d1934099b0; first patched: 1.9.10-0.20260703131214-23d1934099b0
References
- GitHub security advisory GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub
- Advisory reference GitHub