CVE-2026-84318: nginx-ui MCP nginx_config_add directive validation bypass

CVE-2026-84318 · Severity: high · CVSS 8.8 · Published 2026-10-12

nginx-ui is a web interface for managing nginx configuration on servers. The MCP (Model Context Protocol) endpoint used to add nginx config files skips a critical security validation that the REST API performs, allowing authenticated users to inject dangerous nginx directives that would normally be blocked. On servers with certain nginx modules loaded, attackers can execute arbitrary system commands with nginx worker privileges.

Technologies: github.com/0xJacky/Nginx-UI (Go), Nginx UI. Vendors: Go, Nginx UI.

Quick answers

Is CVE-2026-84318 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-84318 being exploited in the wild.
How severe is CVE-2026-84318?
High severity, with a CVSS score of 8.8, published 12 October 2026.
Which products and versions are affected?
github.com/0xJacky/Nginx-UI (Go) >= 1.9.10-0.20250506154222-1330888280a2, < 1.9.10-0.20260703131214-23d1934099b0, SEMVER:introduced=1.9.10-0.20250506154222-1330888280a2,fixed=1.9.10-0.20260703131214-23d1934099b0; Nginx UI <UNKNOWN>.
Is there a fix for CVE-2026-84318?
Yes. github.com/0xJacky/Nginx-UI (Go): upgrade to 1.9.10-0.20260703131214-23d1934099b0 or later. Until then: Restrict access to the MCP endpoint (/mcp, /mcp_message) to trusted clients only, or disable the MCP interface if not required. Ensure nginx is not running with privileged modules (Perl, njs) that would allow code execution; alternatively, run nginx worker processes with minimal privileges and not as root. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-84318 attacked?
It is attacked over the network, in a web application.
Am I affected by CVE-2026-84318?
Check whether you run github.com/0xJacky/Nginx-UI (Go) or Nginx UI at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • github.com/0xJacky/Nginx-UI (Go): upgrade to 1.9.10-0.20260703131214-23d1934099b0 or later
    go get github.com/0xJacky/Nginx-UI@v1.9.10-0.20260703131214-23d1934099b0

Restrict access to the MCP endpoint (/mcp, /mcp_message) to trusted clients only, or disable the MCP interface if not required. Ensure nginx is not running with privileged modules (Perl, njs) that would allow code execution; alternatively, run nginx worker processes with minimal privileges and not as root.

Technical details

The vulnerability is a missing validation call in mcp/config/config_add.go that bypasses config.ValidateConfigFile and its blocklist check for dangerous directives (perl, js_import, load_module, user root, etc.). The identical REST API endpoint correctly calls ValidateConfigFile and rejects these directives. An authenticated attacker (JWT or node-secret token holder) can exploit the MCP tool nginx_config_add to write config files with blocked directives, triggering automatic nginx reload. On nginx instances with Perl or njs modules loaded, this enables post-authentication RCE as the nginx worker user.

Affected products

  • nginx-ui nginx-ui <UNKNOWN>

Identifiers

  • CVE-2026-84318
  • GHSA-9jww-cxg5-rj9m
  • GO-2026-6781

Timeline

  • 2026-10-15: disclosed

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.