Details
Honest scope / caveats
- Authenticated (node secret or user JWT), agent-mediated — not unauthenticated.
- RCE is conditional on the njs/perl module being present; it ships in the official image, so the default Docker deployment is exploitable. Stock nginx without those modules → DoS instead.
- The write path is sandboxed to the nginx conf dir (no path traversal); the bug is directive injection. (The main nginx.conf is inside that dir and can be overwritten with overwrite=true.)
- nginx-ui runs as root by design (it manages nginx); the bypass additionally lets request-handling workers run as root via
user root.
Suggested fix
Call config.ValidateConfigFile(path, content) in handleNginxConfigAdd before os.WriteFile,
matching mcp/config/config_modify.go and the API paths — i.e. complete the 3e411d38 hardening on
the one path it missed.
--- (NOT a form field — include this as the closing section of the Description above) ---
Dedup / novelty
Distinct from CVE-2026-33032 (GHSA-h6c2-x2m2-mwhf, "Unauthenticated MCP Endpoint"), whose root cause
is a MISSING AUTH middleware on /mcp_message (now fixed by adding AuthRequired) and which does not
involve config-content validation. This report is an AUTHENTICATED bypass of the directive-validation
control on the config_add path, and works on a fully patched (post-33032) instance. No existing
CVE/GHSA covers the config_add validation gap (checked osv.dev and the GitHub advisory database for
this repo). Appears novel.