All vulnerabilities

Servers and applications

CVE-2026-84318

MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE

Severity
High 8.8
Published
17 Jul 2026
Last changed
13 Oct 2026
Added to UpHeron
3 Nov 2026
Fixed in
2.4.1
Exploit chance
0.8% in the next 30 daysHigher than 57% of CVEs. EPSS by FIRST, 19 Nov 2026
Weakness
Protection mechanism failure (CWE-693)
Attack
Over the network · Needs a user account · No user action needed
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Also known as
GHSA-9jww-cxg5-rj9m
Sources
CVE Program, Project advisories (GitHub)

Description

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.

api/config/add.go (line 46) calls config.ValidateConfigFile before writing:

mcp/config/config_add.go (line 79) omits that call entirely and writes directly:

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,…
From 0xJacky/nginx-ui's security advisory. Shortened; the full text is there.

Affected software

SoftwareAffected versions
Nginx UIServers and applications · cna:0xjacky|nginx-ui
  • From 2.0.0-rc.6 before 2.4.1
Nginx UIServers and applications · github:0xjacky/nginx-ui
  • From 2.0.0-rc.6 on

About Nginx UI

Yet another WebUI for Nginx

From its GitHub repository.
Docker Hub pulls
1,512,532Docker Hub, 15 Nov 2026
GitHub stars
11,783GitHub, 15 Nov 2026
Forks
921GitHub, 15 Nov 2026
Latest release
v3.0.3GitHub, 15 Nov 2026
Released
12 Nov 2026GitHub
License
AGPL-3.0GitHub
First published on GitHub
19 Feb 2021GitHub

References