CVE-2026-84360: Nginx UI: OTP secure-session step-up can be bypassed via MCP configuration tools
Summary An OTP-enabled authenticated user who cannot use the HTTP configuration mutation endpoints without a valid secure session can still mutate Nginx configuration through /mcp and /mcpmessage using only ordinary authentication.
Details The HTTP configuration mutation surface is explicitly grouped behind middleware.RequireSecureSession(). By contrast, the MCP endpoints are exposed with only middleware.AuthRequired(). The MCP server exposes configuration mutation tools including nginxconfigadd and nginxconfigmodify, so OTP-enabled users gain an alternate path around the intended step-up requirement.
Relevant code paths: - api/config/router.go - internal/middleware/securesession.go - mcp/router.go - mcp/config/configadd.go - mcp/config/configmodify.go
This is a security-control bypass rather than a missing feature. The product already established that OTP-enabled users should complete a secure session before high-impact configuration mutations are accepted on the HTTP path.
PoC I verified this locally in an isolated environment with a temporary end-to-end harness that exercised the real /mcp and /mcpmessage routes.
What the executed test did: 1. Created a temporary config directory and configured Nginx control commands to harmless local values (true) to avoid touching the host. 2. Created a real OTP-enabled user in a temporary SQLite database. 3. Generated a real JWT for that OTP-enabled user. 4. Started a local test server exposing the real /mcp and /mcpmessage routes. 5. Opened an authenticated SSE connection to /mcp with the JWT and no X-Secure-Session-ID. 6. Initialized the MCP session over /mcpmessage. 7. Called the real nginxconfigadd tool over /mcpmessage. 8. Verified that the tool succeeded and created mcp-bypass.conf in the managed config directory without any secure-session step-up.
Observed result from the actual local verification: - The MCP session initialized successfully without any X-Secure-Session-ID. - The config file was written through the MCP tool path using only JWT authentication.
Impact OTP-enabled accounts lose the intended step-up protection for high-impact Nginx configuration changes when MCP is enabled. A user who should be blocked until re-authenticating can still create or modify configuration files and trigger reload behavior through MCP.
Other sources
Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, the HTTP configuration mutation routes require RequireSecureSession, but /mcp and /mcpmessage require only ordinary authentication before exposing nginxconfigadd and nginxconfigmodify. An OTP-enabled user with a normal JWT but no valid X-Secure-Session-ID can therefore create or modify Nginx configuration and trigger reload behavior through MCP, bypassing the intended step-up control. This issue is fixed in version 2.4.1.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
go/github.com/0xJacky/Nginx-UIto a version that resolves this vulnerability.Fixed in 1.9.10-0.20260703131214-23d1934099b0 - Upgrade
Upgrade
Nginx UIto a version that resolves this vulnerability.Fixed in 2.4.1
Event History
Frequently Asked Questions
Who can exploit this issue?
An authenticated Nginx UI user with OTP enabled can exploit it using a normal JWT, even if they do not have a valid X-Secure-Session-ID for the OTP-secured step-up session.
What access does an attacker need to make the bypass useful?
The attacker needs ordinary authenticated access to Nginx UI and access to the MCP endpoints. The affected MCP configuration tools, nginx_config_add and nginx_config_modify, can create or modify Nginx configuration and trigger reload behavior.
Are deployments without OTP-enabled users affected in the same way?
The described bypass specifically concerns an OTP-enabled user bypassing the intended secure-session step-up requirement. The available information does not establish the impact for users or deployments that do not use OTP.
What versions should be remediated?
Nginx UI versions prior to 2.4.1 are affected. Version 2.4.1 fixes the issue.