/

CVE-2026-33032

Severity:

CRITICAL RISK

(9.8)

Missing Authentication in Nginx UI

CVE-2026-33032

Modified

Vulnerability type

Category:

Missing Authentication

CWE:

CWE-306

Impact:

Remote Service Takeover / Remote Code Execution via Configuration Control

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Nginx UI versions 2.3.5 and earlier expose an MCP integration endpoint (/mcp_message) that lacks authentication but still grants access to powerful management tools.

Because the default IP whitelist is treated as "allow all," any network attacker who can reach the UI can remotely restart Nginx, modify its configuration, and trigger reloads, leading to full takeover of the Nginx service.

Affected context

This vulnerability affects deployments of Nginx UI (≤ 2.3.5) that enable the MCP (Model Context Protocol) integration.

Specifically:

  • The /mcp endpoint correctly enforces both IP whitelisting and authentication.
  • The /mcp_message endpoint enforces only IP whitelisting and skips authentication.
  • The default IP whitelist is empty, and the middleware interprets an empty list as "allow any IP."

In environments where Nginx UI is reachable from untrusted networks (e.g., internet-exposed admin panel, flat internal networks, or shared hosting), the /mcp_message endpoint becomes a powerful, unauthenticated control channel for Nginx management operations.

Exploit preconditions

  • Attack surface: HTTP(S) access to the Nginx UI application, specifically the /mcp_message endpoint.
  • Required access: Network-level reachability to the Nginx UI instance; no valid UI credentials are required.
  • Trigger point: Sending crafted HTTP requests to /mcp_message that invoke MCP tools exposed by Nginx UI (e.g., commands to restart Nginx, manage configs, reload).
  • Why exploitation is possible:
  • The security model assumes the combination of IP whitelisting and authentication.
  • The /mcp_message route omits the authentication middleware, relying solely on IP whitelisting.
  • An empty whitelist is treated as a permissive configuration ("allow all") instead of "deny all."
  • As a result, all MCP tools exposed via /mcp_message are callable by any reachable client.

Why this happens

The underlying issue is a mismatch between the intended security model and the actual middleware configuration for the MCP endpoints.

While /mcp correctly chains both IP-based access control and authentication, /mcp_message only applies the IP whitelist middleware and never invokes AuthRequired().

The logic that interprets an empty IP whitelist as "allow all" further undermines protection, effectively disabling network-based filtering in the default configuration.

This maps to CWE-306: Missing Authentication for Critical Function, as a highly privileged management function (Nginx control operations exposed through MCP tools) is reachable without any authentication mechanism.

Potential impact

  • Complete takeover of the Nginx service through unauthenticated MCP tool invocation.
  • Remote restart or shutdown of Nginx, causing denial of service.
  • Creation, modification, or deletion of Nginx configuration files, potentially:
  • Redirecting traffic to attacker-controlled endpoints
  • Injecting malicious reverse proxies or upstreams
  • Weakening TLS, authentication, or access control rules
  • Triggering automatic config reloads to apply malicious changes immediately.
  • Lateral movement or broader compromise if Nginx is used as a gateway or reverse proxy to internal services.
  • Loss of integrity and availability of web services fronted by the affected Nginx instance.

General mitigation guidance

Mitigation strategies should focus on enforcing strong authentication, hardening network exposure, and applying least privilege to management interfaces:

  • Enforce authentication on all management endpoints:
  • Ensure that any endpoint capable of managing Nginx (e.g., invoking MCP tools) is protected by robust authentication middleware, not just IP filtering.
  • Treat unauthenticated access to such endpoints as insecure by default.
  • Harden IP-based access control:
  • Treat an empty whitelist as "deny all" instead of "allow all" to avoid accidental exposure.
  • Restrict access to administrative endpoints (including /mcp and /mcp_message equivalents) to loopback or tightly controlled admin networks.
  • Segment and isolate the management interface:
  • Place Nginx UI behind VPN or jump hosts and avoid direct internet exposure.
  • Use network segmentation and firewall rules to restrict which hosts can reach the UI.
  • Apply principle of least privilege to Nginx management operations:
  • Limit which tools or operations can be exposed via generic integration layers like MCP.
  • Separate read-only monitoring capabilities from configuration-changing actions.
  • Introduce secure-by-default configuration:
  • Ship with conservative defaults that require explicit admin action to expose powerful remote control features.
  • Require explicit configuration to enable MCP or similar integrations, with strong guardrails and clear documentation of risks.

How teams detect issues like this

Detection efforts can focus on both code-level issues and runtime behavior:

  • Static analysis and code review:
  • Verify that all critical routes (restart, reload, config editing, MCP tool invocations) are wrapped with a consistent authentication middleware.
  • Flag any routes that rely solely on IP whitelisting or other weak controls for authorization.
  • Highlight patterns where an empty or missing access-control list is interpreted as "allow all."
  • Configuration and policy checks:
  • Implement policies that require at least one strong authentication layer on any endpoint that can modify server state or configuration.
  • Use automated linters or custom checks to validate route registration and middleware chains.
  • Runtime monitoring and logging:
  • Log all accesses to MCP-related endpoints, including IP address, user identity (if any), and invoked tools.
  • Set alerts for unauthenticated access attempts to management endpoints or unusual patterns of configuration change and reload operations.
  • Security scanning and attack surface mapping:
  • Use application security scanners to enumerate all exposed HTTP endpoints and identify those that appear to be administrative but lack authentication.
  • Periodically test the management interfaces from untrusted network segments to confirm that they are not reachable.

Sources

SourceLink
github.comgithub.com/0xJacky/nginx-ui/security/advisories/GHSA-h6c2-x2m2-mwhf
websec.netwebsec.net/blog/cve-2026-33032-unauthenticated-nginx-ui-mcp-takeover-69e1200f9fceb1f3fbe9c47f

Frequently asked

questions

Yes, if the Nginx UI (and specifically the /mcp_message endpoint) is exposed to the internet or any untrusted network, a remote attacker can directly invoke MCP tools without authentication, leading to full Nginx service takeover.

No. The core problem is missing authentication on the /mcp_message endpoint combined with an "allow all" default whitelist. Any host that can reach the endpoint can exploit it without logging in.

The safest pattern is to enforce strong authentication on all critical management endpoints and to treat empty or missing access-control lists as "deny by default." In practice, this means ensuring that the same authentication middleware wraps both /mcp and /mcp_message (and any similar routes) and that default configuration does not expose administrative functionality.

Preventing similar issues involves:

  • Designing management APIs with explicit, consistent authentication and authorization requirements.
  • Adopting a "secure by default" stance where sensitive features are disabled or locked down until explicitly configured.
  • Using code review checklists and automated tooling to verify that all administrative routes include both authentication and proper authorization checks.
  • Regularly testing deployments for exposed admin interfaces and validating that abstractions like IP whitelisting are used only as defense-in-depth, not as the primary control.
Find out what's already
exploitable in your codebase.