Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)
## Summary `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). ## Root cause — an incomplete hardening patch Commit `3e411d38` ("Harden config write paths", 2026-04-21) introduced `ValidateConfigFile` and wired it into the config-write paths — but its changeset touched only: api/config/add.go (+6), api/config/modify.go (+8), internal/config/validation.go (+199), mcp/config/config_modify.go (+5) It did NOT touch `mcp/config/config_add.go`. So the MCP add path was left without the validation that all of its sibling paths received. `config_add.go` has never called `ValidateConfigFile` (verified via git history); this is an oversight in the hardening, not a regression. ## Affected code (mcp/config/config_add.go, handleNginxConfigAdd) ```go content := mcp.GetString(args, "c
- Products
- github.com/0xJacky/Nginx-UI
- Affected versions
- Not specified
- Fixed versions
- 1.9.10-0.20260703131214-23d1934099b0
- CVEs
- CVE-2026-84317
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 08:44 UTC · Revision 1
Source evidence
Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)
core-osv · Original sourcePublished 15 Oct 2026, 20:11 UTC
## Summary `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). ## Root cause — an incomplete hardening patch Commit `3e411d38` ("Harden config write paths", 2026-04-21) introduced `ValidateConfigFile` and wired it into the config-write paths — but its changeset touched only: api/config/add.go (+6), api/config/modify.go (+8), internal/config/validation.go (+199), mcp/config/config_modify.go (+5) It did NOT touch `mcp/config/config_add.go`. So the MCP add path was left without the validation that all of its sibling paths received. `config_add.go` has never called `ValidateConfigFile` (verified via git history); this is an oversight in the hardening, not a regression. ## Affected code (mcp/config/config_add.go, handleNginxConfigAdd) ```go content := mcp.GetString(args, "c
osv:GHSA-76pm-mq2q-9gcr
github.com/0xJacky/Nginx-UI
Fixed versions: 1.9.10-0.20260703131214-23d1934099b0
Complete source record
{
"id": "b68b975eef983b9f10260bcaea029b0406ea0b2e785ee88192fc494c0f8e97ea",
"url": "https://osv.dev/vulnerability/GHSA-76pm-mq2q-9gcr",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)",
"summary": "## Summary `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). ## Root cause — an incomplete hardening patch Commit `3e411d38` (\"Harden config write paths\", 2026-04-21) introduced `ValidateConfigFile` and wired it into the config-write paths — but its changeset touched only: api/config/add.go (+6), api/config/modify.go (+8), internal/config/validation.go (+199), mcp/config/config_modify.go (+5) It did NOT touch `mcp/config/config_add.go`. So the MCP add path was left without the validation that all of its sibling paths received. `config_add.go` has never called `ValidateConfigFile` (verified via git history); this is an oversight in the hardening, not a regression. ## Affected code (mcp/config/config_add.go, handleNginxConfigAdd) ```go content := mcp.GetString(args, \"c",
"evidence": "osv:GHSA-76pm-mq2q-9gcr",
"products": [
{
"name": {
"value": "github.com/0xJacky/Nginx-UI",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.9.10-0.20260703131214-23d1934099b0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "GHSA-76pm-mq2q-9gcr",
"aliases": [
"CVE-2026-84317",
"GHSA-76pm-mq2q-9gcr",
"GO-2026-6779"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.9.10-0.20260703131214-23d1934099b0"
}
]
}
],
"package": {
"name": "github.com/0xJacky/Nginx-UI",
"purl": "pkg:golang/github.com/0xJacky/Nginx-UI",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-76pm-mq2q-9gcr/GHSA-76pm-mq2q-9gcr.json"
}
}
],
"modified": "2026-10-19T21:41:06.485505015Z",
"provider": "osv",
"references": [
"https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-76pm-mq2q-9gcr",
"https://nvd.nist.gov/vuln/detail/CVE-2026-84317",
"https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2",
"https://github.com/0xJacky/nginx-ui",
"https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1"
],
"provider_metadata": {
"cwe_ids": [
"CWE-20",
"CWE-693"
],
"severity": "HIGH",
"github_reviewed": true,
"nvd_published_at": "2026-10-12T21:17:22Z",
"github_reviewed_at": "2026-10-15T20:11:07Z"
}
},
"related_cves": [
{
"value": "CVE-2026-84317",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/database_specific/severity"
},
"source_id": "core-osv",
"document_id": 376774,
"published_at": "2026-10-15T20:11:07+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
core-osv · Original sourcePublished 19 Oct 2026, 21:08 UTC
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
osv:GO-2026-6779
github.com/0xJacky/Nginx-UI
Fixed versions: 1.9.10-0.20260703131214-23d1934099b0
Complete source record
{
"id": "162522f288e8a1e6c913a8c791a2f06e081d3002efb99d57ffc1dd9d2199c666",
"url": "https://osv.dev/vulnerability/GO-2026-6779",
"method": "structured",
"payload": {
"kind": "advisory",
"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",
"summary": "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",
"evidence": "osv:GO-2026-6779",
"products": [
{
"name": {
"value": "github.com/0xJacky/Nginx-UI",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "1.9.10-0.20260703131214-23d1934099b0",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "GO-2026-6779",
"aliases": [
"CVE-2026-84317",
"GHSA-76pm-mq2q-9gcr",
"GO-2026-6779"
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.9.10-0.20260703131214-23d1934099b0"
}
]
}
],
"package": {
"name": "github.com/0xJacky/Nginx-UI",
"purl": "pkg:golang/github.com/0xJacky/Nginx-UI",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://vuln.go.dev/ID/GO-2026-6779.json"
},
"ecosystem_specific": {}
}
],
"modified": "2026-10-19T21:31:53.419235882Z",
"provider": "osv",
"references": [
"https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-76pm-mq2q-9gcr",
"https://nvd.nist.gov/vuln/detail/CVE-2026-84317",
"https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2",
"https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1"
],
"provider_metadata": {
"url": "https://pkg.go.dev/vuln/GO-2026-6779",
"review_status": "UNREVIEWED"
}
},
"related_cves": [
{
"value": "CVE-2026-84317",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 376721,
"published_at": "2026-10-19T21:08:35+00:00"
}