---
id: "CVE-2026-84317"
kind: "vulnerability"
aliases: ["CVE-2026-84317", "GHSA-76pm-mq2q-9gcr", "GO-2026-6779"]
title: "Nginx UI: MCP nginx_config_add skips config directive validation \u2192 authenticated nginx directive injection (RCE on the official image) in github.com/0xJacky/Nginx-UI"
severity: "high"
cvss: 8.8
epss: 0.00376
exploited: false
status: "open"
category: "ai-tooling"
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"]
published_at: "2026-10-12T21:17:22+00:00"
first_seen_at: "2026-10-23T19:13:08+00:00"
updated_at: "2026-10-23T20:56:59+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6779", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-84317", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-84317", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# 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

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.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- go:github.com/0xJacky/Nginx-UI affected < 1.9.10-0.20260703131214-23d1934099b0 fixed 1.9.10-0.20260703131214-23d1934099b0

## 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.

## Timeline

- 2026-10-23T19:13:08+00:00 govuln https://pkg.go.dev/vuln/GO-2026-6779
- 2026-10-23T19:13:43+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-84317
- 2026-10-23T19:35:23+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-84317

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
