Skip to content
Heist/ feed
Back to feed
HighFix available

Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE

Type: advisorySources: OSV2 source records

### Summary 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. ### Details `api/config/add.go` (line 46) calls `config.ValidateConfigFile` before writing: ```go err = config.ValidateConfigFile(path, content) // validates directives, checks blocklist if err != nil { cosy.ErrHandler(c, err) return } ``` `mcp/config/config_add.go` (line 79) omits that call entirely and writes directly: ```go err = os.WriteFile(path, []byte(content), 0644) // no ValidateConfigFile, no blocklist check ... res := nginx.Control(nginx.Reload) // reload triggered immediately ``` `config.ValidateConfigFile` runs two checks: - **`ValidateConfigContent`** — rejects control characters, enforces encoding. - **`ValidateConfigDirectives`** — rejects a blocklist of dangerous directives: `perl`, `perl_modules`, `perl_require`, `perl_set`, `js_import`, `js_set`, `js_content`, `load_module` (restricted modules), `user root`, and others. Neither check runs on the MCP path. Note that `mcp/

Products
github.com/0xJacky/Nginx-UI
Affected versions
Not specified
Fixed versions
1.9.10-0.20260703131214-23d1934099b0
CVEs
CVE-2026-84318
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 08:45 UTC · Revision 1

Source evidence

Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE

core-osv · Original source

Published 15 Oct 2026, 20:11 UTC

### Summary 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. ### Details `api/config/add.go` (line 46) calls `config.ValidateConfigFile` before writing: ```go err = config.ValidateConfigFile(path, content) // validates directives, checks blocklist if err != nil { cosy.ErrHandler(c, err) return } ``` `mcp/config/config_add.go` (line 79) omits that call entirely and writes directly: ```go err = os.WriteFile(path, []byte(content), 0644) // no ValidateConfigFile, no blocklist check ... res := nginx.Control(nginx.Reload) // reload triggered immediately ``` `config.ValidateConfigFile` runs two checks: - **`ValidateConfigContent`** — rejects control characters, enforces encoding. - **`ValidateConfigDirectives`** — rejects a blocklist of dangerous directives: `perl`, `perl_modules`, `perl_require`, `perl_set`, `js_import`, `js_set`, `js_content`, `load_module` (restricted modules), `user root`, and others. Neither check runs on the MCP path. Note that `mcp/

osv:GHSA-9jww-cxg5-rj9m

github.com/0xJacky/Nginx-UI

Fixed versions: 1.9.10-0.20260703131214-23d1934099b0

Complete source record
{
  "id": "9df7fe410adeed78c6461e202af513b9edaadf1c557bbd45a3241d766aa2dcf4",
  "url": "https://osv.dev/vulnerability/GHSA-9jww-cxg5-rj9m",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE",
    "summary": "### Summary 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. ### Details `api/config/add.go` (line 46) calls `config.ValidateConfigFile` before writing: ```go err = config.ValidateConfigFile(path, content) // validates directives, checks blocklist if err != nil { cosy.ErrHandler(c, err) return } ``` `mcp/config/config_add.go` (line 79) omits that call entirely and writes directly: ```go err = os.WriteFile(path, []byte(content), 0644) // no ValidateConfigFile, no blocklist check ... res := nginx.Control(nginx.Reload) // reload triggered immediately ``` `config.ValidateConfigFile` runs two checks: - **`ValidateConfigContent`** — rejects control characters, enforces encoding. - **`ValidateConfigDirectives`** — rejects a blocklist of dangerous directives: `perl`, `perl_modules`, `perl_require`, `perl_set`, `js_import`, `js_set`, `js_content`, `load_module` (restricted modules), `user root`, and others. Neither check runs on the MCP path. Note that `mcp/",
    "evidence": "osv:GHSA-9jww-cxg5-rj9m",
    "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-9jww-cxg5-rj9m",
      "aliases": [
        "CVE-2026-84318",
        "GHSA-9jww-cxg5-rj9m",
        "GO-2026-6781"
      ],
      "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": "1.9.10-0.20250506154222-1330888280a2"
                },
                {
                  "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-9jww-cxg5-rj9m/GHSA-9jww-cxg5-rj9m.json"
          }
        }
      ],
      "modified": "2026-10-19T21:41:19.085165566Z",
      "provider": "osv",
      "references": [
        "https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-9jww-cxg5-rj9m",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-84318",
        "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-693"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-12T21:17:22Z",
        "github_reviewed_at": "2026-10-15T20:11:18Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-84318",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 376802,
  "published_at": "2026-10-15T20:11:18+00:00"
}

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

core-osv · Original source

Published 19 Oct 2026, 21:08 UTC

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

osv:GO-2026-6781

github.com/0xJacky/Nginx-UI

Fixed versions: 1.9.10-0.20260703131214-23d1934099b0

Complete source record
{
  "id": "231f72a088d69c34643ed24d267ca01086b3168a0078d55275bd0fc18eba1a48",
  "url": "https://osv.dev/vulnerability/GO-2026-6781",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE in github.com/0xJacky/Nginx-UI",
    "summary": "Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE in github.com/0xJacky/Nginx-UI",
    "evidence": "osv:GO-2026-6781",
    "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-6781",
      "aliases": [
        "CVE-2026-84318",
        "GHSA-9jww-cxg5-rj9m",
        "GO-2026-6781"
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "SEMVER",
              "events": [
                {
                  "introduced": "1.9.10-0.20250506154222-1330888280a2"
                },
                {
                  "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-6781.json"
          },
          "ecosystem_specific": {}
        }
      ],
      "modified": "2026-10-19T21:31:44.962526565Z",
      "provider": "osv",
      "references": [
        "https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-9jww-cxg5-rj9m",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-84318",
        "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-6781",
        "review_status": "UNREVIEWED"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-84318",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 376634,
  "published_at": "2026-10-19T21:08:35+00:00"
}