{"id":"CVE-2026-84317","kind":"vulnerability","aliases":["CVE-2026-84317","GHSA-76pm-mq2q-9gcr","GO-2026-6779"],"related":[],"title":"Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image) in github.com/0xJacky/Nginx-UI","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.","summary":"The Nginx UI MCP tool nginx_config_add writes caller-supplied content to nginx config without the directive validation the other config paths enforce. An authenticated MCP caller, or an agent steered by prompt injection, can add blocked directives such as js_* or perl_* and get code execution in nginx.","severity":"high","cvss":8.8,"epss":0.00376,"exploited":false,"exploited_at":null,"products":[{"name":"github.com/0xJacky/Nginx-UI","fixed":["1.9.10-0.20260703131214-23d1934099b0"],"affected":"< 1.9.10-0.20260703131214-23d1934099b0","ecosystem":"go"}],"ecosystems":["go"],"tags":["ai-tooling","docker","go","mcp","nginx","nginx-ui","self-hosted"],"not_affected_if":["mcp-disabled","njs-and-perl-modules-absent","patched-version"],"how_to_check":"Check whether the running Nginx UI is older than 2.4.1 and whether the MCP server is enabled. Check whether the njs or perl nginx module is loaded, for example with nginx -V or the load_module lines in the config.","fix":"Upgrade Nginx UI to 2.4.1, per the description. govuln lists the Go module fixed version as 1.9.10-0.20260703131214-23d1934099b0.","status":"open","published_at":"2026-10-12T21:17:22+00:00","first_seen_at":"2026-10-23T19:13:08+00:00","triaged_at":"2026-10-23T20:56:59+00:00","updated_at":"2026-10-23T20:56:59+00:00","category":"ai-tooling","confidence":0.7,"triage":{"at":"2026-10-23T20:56:59Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade Nginx UI to 2.4.1, per the description. govuln lists the Go module fixed version as 1.9.10-0.20260703131214-23d1934099b0.","reach":"unknown","impact":"high","summary":"The Nginx UI MCP tool nginx_config_add writes caller-supplied content to nginx config without the directive validation the other config paths enforce. An authenticated MCP caller, or an agent steered by prompt injection, can add blocked directives such as js_* or perl_* and get code execution in nginx.","category":"ai-tooling","who_cares":["nginx-ui","mcp","docker","self-hosted","nginx"],"confidence":0.7,"needs_auth":"yes","worst_case":"Authenticated attacker injects nginx directives that run code on the server.","analyst_note":"Sources conflict on the fixed version: description says 2.4.1, govuln lists pseudo-version 1.9.10-0.20260703131214-23d1934099b0; confirm at https://pkg.go.dev/vuln/GO-2026-6779 and the GHSA-76pm-mq2q-9gcr advisory.","how_to_check":"Check whether the running Nginx UI is older than 2.4.1 and whether the MCP server is enabled. Check whether the njs or perl nginx module is loaded, for example with nginx -V or the load_module lines in the config.","needs_analyst":true,"not_affected_if":["mcp-disabled","njs-and-perl-modules-absent","patched-version"],"user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.001018,"input_tokens":3213,"output_tokens":1394,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':25A,33A,36A '-6779':34A '-84317':26A,37A '/0xjacky/nginx-ui':23A,40A '2.4.1':119C,233C '76pm':29A '9gcr':31A 'add':6A,61B,91B,166C 'agent':85B,192C 'ai':42B 'ai-tool':41B 'api/config/add.go':154C 'api/config/modify.go':155C 'authent':11A,80B,186C 'avail':221C 'block':92B,127C,208C 'call':170C 'caller':64B,82B,176C,188C 'caller-suppli':63B,175C 'code':101B,212C 'config':5A,8A,60B,69B,76B,151C,165C 'config-writ':150C 'content':66B,178C 'control':125C,204C 'cve':24A,35A 'danger':128C 'deploy':215C 'direct':9A,13A,72B,93B,130C,202C 'disk':181C 'docker':44B,225C 'e.g':222C 'enforc':78B,144C 'exact':200C 'execut':102B,213C 'fix':230C 'four':149C 'fourth':159C 'get':100B 'ghsa':28A 'ghsa-76pm-mq2q-9gcr':27A 'github.com':22A,39A 'github.com/0xjacky/nginx-ui':21A,38A 'go':32A,45B 'host':53B 'imag':19A,226C 'induc':193C 'inject':14A,89B,196C,199C 'interfac':111C 'internal/config/validation.go':120C 'issu':228C 'js':96B,131C 'lead':209C 'load':133C 'mcp':3A,46B,57B,81B,162C,187C,191C 'mcp/config/config_add.go':167C 'mcp/config/config_modify.go':157C 'meant':206C 'modul':134C,138C,219C 'mq2q':30A 'nginx':1A,4A,12A,47B,49B,55B,59B,68B,104B,105C,114C,129C,164C,184C,211C 'nginx-ui':48B 'njs/perl':137C,218C 'offici':18A,224C 'path':77B,153C,160C 'perl':98B,132C 'prior':117C 'prompt':88B,195C 'rce':15A 'reload':183C 'root':141C 'secur':124C 'self':52B 'self-host':51B 'server':116C 'skip':7A 'steer':86B 'straight':179C 'suppli':65B,177C 'therefor':198C 'three':146C 'tool':43B,58B,163C 'ui':2A,50B,56B,106C 'user':110C,140C 'valid':10A,73B 'validateconfigfil':121C 'version':232C 'via':194C 'web':109C,115C 'without':70B 'write':62B,152C,173C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-12T21:17:22+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"govuln","external_id":"GO-2026-6779","url":"https://pkg.go.dev/vuln/GO-2026-6779","severity":null,"published_at":"2026-10-19T21:08:35+00:00","modified_at":"2026-10-19T21:08:35+00:00","first_seen_at":"2026-10-23T19:13:08+00:00","fetched_at":"2026-10-23T19:13:08+00:00","note":null},{"source":"epss","external_id":"CVE-2026-84317","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-84317","severity":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-10-23T19:13:43+00:00","fetched_at":"2026-10-23T19:13:43+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-84317","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-84317","severity":null,"published_at":"2026-10-12T21:17:22+00:00","modified_at":"2026-10-13T18:17:26+00:00","first_seen_at":"2026-10-23T19:35:23+00:00","fetched_at":"2026-10-23T19:35:23+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}