Loading0%
SUBZER0
LIVE
Alerts

CVE-2026-84318

Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE

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.82%
  • Public exploit
  • P2 · This week

Why P2: this week.

Description

### Summary The MCP tool `nginx_config_add` writes nginx configuration files to disk and triggers an nginx reload without calling `config.ValidateConfigFile`. The identical flow in the REST API (`POST /api/configs`) does call that function and correctly rejects dangerous directives. An authenticated attacker can exploit this gap to write config files containing any blocked directive (`perl`, `js_import`, `load_module`, `user root`, etc.), bypassing nginx-ui's entire security layer. On a server with the nginx Perl, njs, or Lua module loaded, this is post-authentication Remote Code Execution. ### Details `api/config/add.go` (line 46) calls `config.ValidateConfigFile` before writing: ```go err = config.ValidateConfigFile(path, content) // validates directives, checks blocklist if err != nil { cosy.ErrHandler(c, err) return } ``` `mcp/config/config_add.go` (line 79) omits that call entirely and writes directly: ```go err = os.WriteFile(path, []byte(content), 0644) // no ValidateConfigFile, no blocklist check ... res := nginx.Control(nginx.Reload) // reload triggered immediately ``` `config.ValidateConfigFile` runs two checks: - **`ValidateConfigContent`** — rejects control characters, enforces encoding. - **`ValidateConfigDirectives`** — rejects a blocklist of dangerous directives: `perl`, `perl_modules`, `perl_require`, `perl_set`, `js_import`, `js_set`, `js_content`, `load_module` (restricted modules), `user root`, and others. Neither check runs…

Affected products

  • go github.com/0xJacky/Nginx-UI >= 1.9.10-0.20250506154222-1330888280a2, < 1.9.10-0.20260703131214-23d1934099b0; first patched: 1.9.10-0.20260703131214-23d1934099b0

References

Browse more

Go modulesnginxWeek 42, 2026 recap

Published 2026-10-12 · sources: GitHub Advisory Database