CVE-2026-84317 Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)

High 8.8 Published Updated

Authenticated attackers can inject dangerous Nginx directives via the MCP config add tool, leading to remote code execution on systems with njs or perl modules.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-84317?

CVE-2026-84317 is a high-severity code injection vulnerability in 0xJacky nginx-ui, published on 12 Oct 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, 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). This issue is fixed in version 2.4.1.

Weakness: CWE-693, CWE-20

Which versions are affected by CVE-2026-84317?

3 open source packages ship an affected version, including github.com/0xJacky/Nginx-UI.

PackageAffectedFixed in
github.com/0xJacky/Nginx-UI GoAll versions1.9.10-0.20260703131214-23d1934099b0
github.com/0xJacky/Nginx-UI GoAll versions1.9.10-0.20260703131214-23d1934099b0
github.com/0xJacky/Nginx-UI GoAll versions1.9.10-0.20260703131214-23d1934099b0

How do I fix CVE-2026-84317?

Upgrade github.com/0xJacky/Nginx-UI to 1.9.10-0.20260703131214-23d1934099b0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-84317 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-84317 exists.

Sources

Also known as GHSA-76pm-mq2q-9gcr, GO-2026-6779.

Is CVE-2026-84317 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free