---
id: "CVE-2026-84318"
kind: "vulnerability"
aliases: ["CVE-2026-84318", "GHSA-9jww-cxg5-rj9m", "GO-2026-6781"]
title: "Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation \u2014 Authenticated RCE in github.com/0xJacky/Nginx-UI"
severity: "high"
cvss: 8.8
epss: 0.00617
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.20250506154222-1330888280a2, < 1.9.10-0.20260703131214-23d1934099b0", "ecosystem": "go"}]
ecosystems: ["go"]
tags: ["ai-tooling", "go", "mcp", "nginx", "nginx-ui", "self-hosted"]
not_affected_if: ["version-outside-range"]
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:52+00:00"
sources: [{"source": "govuln", "url": "https://pkg.go.dev/vuln/GO-2026-6781", "first_seen_at": "2026-10-23T19:13:08+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-84318", "first_seen_at": "2026-10-23T19:13:43+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-84318", "first_seen_at": "2026-10-23T19:35:23+00:00"}]
---

# Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE in github.com/0xJacky/Nginx-UI

The MCP tool nginx_config_add in Nginx UI writes nginx config files and reloads nginx without running the directive validation that the REST API applies. An authenticated attacker can write blocked directives such as perl, js_import, load_module, or user root, which leads to code execution on servers that load the nginx Perl, njs, or Lua module.

_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.20250506154222-1330888280a2, < 1.9.10-0.20260703131214-23d1934099b0 fixed 1.9.10-0.20260703131214-23d1934099b0

## How to check

Check the nginx-ui version: versions from 2.0.0-rc.6 up to but not including 2.4.1 are affected. For Go module users, the affected range is before 1.9.10-0.20260703131214-23d1934099b0.

## Fix

Upgrade Nginx UI to 2.4.1 or later (Go module 1.9.10-0.20260703131214-23d1934099b0 or later). Rotate credentials for any nginx-ui account that may have been exposed.

## Timeline

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

## From the sources

Nginx UI is a web user interface for the Nginx web server. From 2.0.0-rc.6 until 2.4.1, 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. 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_
