{
  "schema": "aidefend-secureflow-metadata-v1",
  "flow_id": "aidefend-research-sf0108-nginx-ui-mcpwn-unauthenticated-mcp-endpoint",
  "title": "MCPwn: An nginx-ui MCP Endpoint Without Authentication Lets Callers Rewrite Nginx Configuration",
  "subtitle": "The endpoint that opens an MCP session checked credentials. The endpoint that executes the tool calls did not.",
  "summary": "nginx-ui, an open-source web interface for managing Nginx, includes an MCP (Model Context Protocol) interface that lets AI assistants edit configuration and reload the server through tool calls. Pluto Security found that the endpoint that opens an MCP session checked credentials, while /mcp_message, which receives every tool call, checked only an IP allowlist that is empty, and therefore open to everyone, by default (CVE-2026-33032). Reporting says attackers get a session with a credential taken through a second flaw, CVE-2026-27944, an unauthenticated backup download in versions before 2.3.3. Recorded Future lists CVE-2026-33032 as exploited in March 2026, without attack details.",
  "reviewed": true,
  "import_status": "curated-research",
  "ai_layers": [
    "tool-integrations-mcp"
  ],
  "risk_impact": [
    "system-compromise-rce",
    "data-exfiltration",
    "credential-identity-theft"
  ],
  "affected_components": [
    "nginx-ui MCP integration (/mcp and /mcp_message endpoints)",
    "nginx-ui backup download endpoint (/api/backup)",
    "Nginx configuration directory and reload control managed through nginx-ui"
  ],
  "source_research": {
    "provider": "Pluto Security",
    "primary_url": "https://pluto.security/blog/mcp-bug-nginx-security-vulnerability-cvss-9-8/",
    "published": "2026-04-15",
    "note": "Exploitation of CVE-2026-33032 in the wild is confirmed by Recorded Future's own data and by later alerts, without any public detail about the attackers' actions. The steps in this flow follow Pluto Security's lab proof of concept, the two maintainer advisories, and published descriptions of the chain with CVE-2026-27944. The first two steps apply to versions before 2.3.3, where the backup flaw exists."
  },
  "attack_steps": [
    {
      "id": "download-backup",
      "title": "Download and decrypt a backup without logging in",
      "zhTitle": "不用登入就下載並解開系統備份",
      "summary": "On nginx-ui versions before 2.3.3, the backup endpoint answers without authentication and returns the key and IV for the archive in a response header (CVE-2026-27944). The archive holds the application's database and configuration file. The Hacker News reports that this includes the node secret that authenticates the MCP interface.",
      "zhSummary": "在 2.3.3 之前的 nginx-ui 版本，備份端點不需要身分驗證就會回應，還把解開備份檔所需的金鑰與初始向量（IV）放在 HTTP response header (標頭) 裡（CVE-2026-27944）。備份檔包含 nginx-ui 的資料庫與設定檔；依 The Hacker News 報導，其中也有用來驗證 MCP 介面的 node secret。",
      "tactic": "AML.TA0013",
      "technique": "AML.T0106",
      "layout": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "open-mcp-session",
      "title": "Open an MCP session with the copied node secret",
      "zhTitle": "用取得的 node secret 建立 MCP 工作階段",
      "summary": "The attacker sends GET /mcp with the node secret. This endpoint does check credentials, so the secret is what gets the request through. The server opens the event stream and announces a message URL that carries a session ID.",
      "zhSummary": "攻擊者帶著 node secret 對 /mcp 送出 GET 請求。這個端點會檢查憑證，所以請求是靠這組 secret 才通過驗證。伺服器接著開啟事件串流，並回傳一個帶有工作階段 ID 的訊息端點網址。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0012",
      "layout": {
        "x": 610,
        "y": 0
      }
    },
    {
      "id": "call-without-credentials",
      "title": "Send tool calls to /mcp_message with only the session ID",
      "zhTitle": "只帶工作階段 ID 就向 /mcp_message 送出工具呼叫",
      "summary": "Through version 2.3.3 the message endpoint ran the IP allowlist check and nothing else, and an empty allowlist admits every address. A POST that carries the session ID but no secret, token or cookie is accepted and handed to the same handler that executes tools (CVE-2026-33032).",
      "zhSummary": "在 2.3.3（含）以前的版本，訊息端點只做 IP 允許清單檢查；清單預設是空的，而空清單會放行所有來源位址。因此，只帶工作階段 ID、沒有任何 secret、token 或 cookie 的 POST 請求也會被接受，並交給負責執行工具的同一個處理程式（CVE-2026-33032）。",
      "tactic": "AML.TA0004",
      "technique": "AML.T0132",
      "layout": {
        "x": 1220,
        "y": 0
      }
    },
    {
      "id": "read-nginx-config",
      "title": "List the tools and read the Nginx configuration",
      "zhTitle": "列出可用工具並讀取 Nginx 設定",
      "summary": "In Pluto's lab run, a separate attacker host listed all 12 tools and then read nginx.conf through the read tools. Configuration files reveal backend addresses, upstream servers and certificate paths.",
      "zhSummary": "在 Pluto 的實驗環境中，另一台攻擊端主機先列出全部 12 個工具，再透過讀取類工具取得 nginx.conf。設定檔會透露後端位址、上游伺服器與憑證路徑。",
      "tactic": "AML.TA0009",
      "technique": "AML.T0037",
      "layout": {
        "x": 1830,
        "y": 0
      }
    },
    {
      "id": "write-server-block",
      "title": "Write a new server block with nginx_config_add",
      "zhTitle": "用 nginx_config_add 寫入新的 server 區塊",
      "summary": "The attacker calls nginx_config_add with a file name and configuration content. The tool writes the file into the Nginx configuration directory and then reloads Nginx, so a single call both creates the change and puts it into effect.",
      "zhSummary": "攻擊者呼叫 nginx_config_add，傳入檔名與設定內容。這個工具會把檔案寫進 Nginx 設定目錄，接著重新載入 Nginx，所以一次呼叫就能同時新增設定並讓它生效。",
      "tactic": null,
      "technique": null,
      "layout": {
        "x": 2440,
        "y": 0
      }
    },
    {
      "id": "serve-attacker-config",
      "title": "Nginx loads and serves the injected configuration",
      "zhTitle": "Nginx 載入並依照被植入的設定提供服務",
      "summary": "In the lab run, the injected server block began serving content chosen by the attacker host. The advisory lists traffic interception, logging of Authorization headers and an outage caused by an invalid configuration as further possibilities. None of these was demonstrated.",
      "zhSummary": "在實驗環境中，被植入的 server 區塊開始回應攻擊端主機指定的內容。安全公告另外列出攔截流量、把 HTTP request 的 Authorization header (標頭) 寫進記錄檔，以及用無效設定讓服務中斷等可能後果，不過這些後果都沒有實際示範。",
      "tactic": null,
      "technique": null,
      "layout": {
        "x": 3050,
        "y": 0
      }
    }
  ],
  "threat_refs": [
    {
      "id": "AML.T0106",
      "name": "Exploitation for Credential Access"
    },
    {
      "id": "AML.T0012",
      "name": "Valid Accounts"
    },
    {
      "id": "AML.T0132",
      "name": "Misconfigured or Publicly Exposed AI Services"
    },
    {
      "id": "AML.T0037",
      "name": "Data from Local System"
    }
  ],
  "reader_narrative": {
    "pathCount": 1,
    "topologyNote": "One ordered path. The first phase depends on the backup flaw, which exists only before 2.3.3; the unauthenticated message endpoint exists through 2.3.3. Phases 2 and 3 follow the lab proof of concept.",
    "groups": [
      {
        "id": "session",
        "kind": "shared",
        "eyebrow": "Phase 1",
        "label": "A backup flaw supplies the credential for the session step",
        "summary": "On versions before 2.3.3, an unauthenticated backup download yields the node secret, which opens an MCP session on the endpoint that does check credentials.",
        "stepIds": [
          "download-backup",
          "open-mcp-session"
        ]
      },
      {
        "id": "tools",
        "kind": "path",
        "eyebrow": "Phase 2",
        "label": "The message endpoint accepts tool calls with only the session ID",
        "summary": "With no credential on the request, the caller reads configuration and writes a new server block.",
        "stepIds": [
          "call-without-credentials",
          "read-nginx-config",
          "write-server-block"
        ]
      },
      {
        "id": "effect",
        "kind": "path",
        "eyebrow": "Phase 3",
        "label": "Nginx runs the injected configuration",
        "summary": "The write tool reloads Nginx, which begins serving the injected server block.",
        "stepIds": [
          "serve-attacker-config"
        ]
      }
    ]
  }
}
