Nginx UI: Missing directive validation in MCP tool enables nginx code execution
Summary
The MCP tool nginx_config_add in Nginx UI writes caller-supplied configuration directly to disk and reloads nginx without the validation that blocks dangerous directives such as js_*, perl_*, load_module for njs/perl and user root. An authenticated MCP caller, or an AI agent manipulated via prompt injection, can therefore inject these directives. On deployments where the njs or perl module is available, for example the official Docker image, this can lead to code execution in nginx, which runs with root privileges.
Affected
- Nginx UI (0xJacky) versions before 2.4.1, according to the CNA record
- Note: sources differ in notation for the range; verify against the GitHub advisory
Fixed in
- Version 2.4.1 (fix commit 23d1934099b05b2a01589b48129dc3d3159d91c2)
- Newer releases are available; upgrade to the current release line
Workaround
Unknown.
- Restrict access to the MCP endpoints (/mcp, /mcp_message) to trusted users and agents until patched
- Do not expose the Nginx UI interface to the internet
Exploitation
- CISA SSVC: exploitation status 'poc', automatable: no, technical impact: total
- A public proof of concept is referenced in the vendor advisory
- No evidence of active exploitation found; not listed in KEV according to a third-party tracker
- EPSS: 0.00376
Our recommendation
- Upgrade Nginx UI to 2.4.1 or later, preferably the current release
- Verify that the MCP endpoint is not reachable from untrusted networks and disable MCP if unused
- Review nginx configuration files written through the MCP tool since exposure
- Check the related older advisory GHSA-h6c2-x2m2-mwhf (unauthenticated MCP access) and confirm it is fixed
- Prioritise this where the instance is internet-exposed or several users or agents have MCP access
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-76pm-mq2q-9gcr github.com
- Fix commit 23d1934 github.com
- Release v2.4.1 github.com
- OSV CVE-2026-84317 osv.dev
- GitLab Advisory Database advisories.gitlab.com
- VulDB 417242 vuldb.com
- Strix CVE-2026-84317 www.strix.ai
- GitHub Security Advisory GHSA-h6c2-x2m2-mwhf github.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 20:21.
Original description (NVD)
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.
NVD references (4)
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
