Skip to main content
Vulnerability Database/CVE-2026-107804

CVE-2026-107804: Nginx UI Authentication Bypass Vulnerability

CVE-2026-107804 is an authentication bypass flaw in Nginx UI affecting versions 2.2.0 to 2.6.0. Attackers can exploit reverse proxy misconfiguration to trigger login bans and bypass IP restrictions. This article covers technical details, affected versions, impact assessment, and remediation guidance.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107804 Overview

CVE-2026-107804 affects Nginx UI, a web user interface for the Nginx web server. Versions from 2.2.0 up to (but not including) 2.6.0 ship a bundled reverse proxy that does not preserve the external client identity used by the Gin web framework. The backend lacks a trusted proxy configuration, so management requests are attributed to the loopback address and satisfy the IP allowlist loopback exception, though valid credentials are still required. Failed logins from different external clients are also attributed to the same loopback address. This allows an unauthenticated attacker to trigger a shared temporary login ban for password or one-time password (OTP) authentication without invalidating existing sessions. The issue is tracked under [CWE-346] Origin Validation Error and fixed in version 2.6.0.

Critical Impact

An unauthenticated remote attacker can lock legitimate users out of password and OTP authentication by submitting failed logins that all map to the loopback address, producing a shared ban that affects every would-be login.

Affected Products

  • Nginx UI versions 2.2.0 through 2.5.x
  • Deployments using the bundled reverse proxy without a trusted proxy configuration
  • Instances relying on the IP allowlist loopback exception for management access

Discovery Timeline

  • 2026-10-09 - CVE-2026-107804 published to the National Vulnerability Database (NVD)
  • 2026-10-09 - Last updated in NVD database

Technical Details for CVE-2026-107804

Vulnerability Analysis

Nginx UI bundles a reverse proxy in front of a Gin-based backend. Gin determines the client IP from request headers such as X-Forwarded-For and X-Real-IP, but only when a trusted proxy list is configured. In affected versions, Nginx UI does not set a TrustedProxies value, so Gin falls back to the direct connection source. Because the bundled proxy forwards requests over loopback, every external request is attributed to 127.0.0.1.

This identity confusion has two downstream consequences. First, the IP allowlist contains a loopback exception intended for local administration. External requests inherit this exception and reach management endpoints, though credentials are still enforced. Second, the brute-force protection counts failed logins per client IP. Because all external failures map to loopback, the counter is shared across every attacker and every legitimate user.

Root Cause

The root cause is an origin validation error [CWE-346]. The backend trusts the transport-level peer address instead of parsing forwarded headers from the trusted bundled proxy. Without a configured TrustedProxies value, Gin cannot distinguish between a true loopback request and a proxied external request.

Attack Vector

An unauthenticated attacker sends repeated failed login attempts to the Nginx UI authentication endpoint from an arbitrary network location. Each failure is attributed to 127.0.0.1. Once the attempts cross the configured threshold (default MaxAttempts = 10 within BanThresholdMinutes = 10), the ban applies to the shared loopback identity. Password and OTP authentication are blocked for all users while existing sessions remain valid.

text
# Patch excerpt: app.example.ini — adds TrustedProxies to the [auth] block
[auth]
IPWhiteList         =
+TrustedProxies      =
BanThresholdMinutes = 10
MaxAttempts         = 10

Source: GitHub commit e30e331

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-107804

Indicators of Compromise

  • Authentication logs showing bursts of failed logins all attributed to 127.0.0.1 while the underlying TCP connections originate externally.
  • Legitimate users reporting that password or OTP login is temporarily blocked while existing sessions continue to function.
  • Access to management endpoints from clients that should not satisfy the IP allowlist loopback exception.

Detection Strategies

  • Correlate reverse proxy access logs with Nginx UI application logs to compare the real source IP against the IP recorded by the backend.
  • Alert on repeated 401 or authentication-failure responses where the backend-logged client IP is 127.0.0.1 but the proxy upstream shows an external address.
  • Flag any login ban events whose attributed client IP is loopback, since under correct configuration this should be rare.

Monitoring Recommendations

  • Ingest both Nginx access logs and Nginx UI authentication logs into a central analytics platform to maintain IP correlation.
  • Track the rate of failed authentication attempts per real client IP, not per backend-attributed IP.
  • Monitor the Nginx UI version string across deployments to confirm all instances have been upgraded to 2.6.0 or later.

How to Mitigate CVE-2026-107804

Immediate Actions Required

  • Upgrade Nginx UI to version 2.6.0 or later, which introduces the TrustedProxies setting and hardens session handling.
  • Configure the new TrustedProxies value in the [auth] block to match the address of the bundled reverse proxy so the backend trusts forwarded client identity.
  • Review the IP allowlist and remove or restrict the loopback exception if it is not required for local administration.
  • Audit active sessions after upgrading, since the issue allowed denial of authentication without invalidating existing sessions.

Patch Information

The fix is included in Nginx UI release v2.6.0. The code change is in commit e30e331, which hardens session handling and adds trusted proxy configuration. See GHSA-9h23-53f4-q947 for the full advisory.

Workarounds

  • Place Nginx UI behind an external reverse proxy that strips or normalizes X-Forwarded-For headers and restrict management endpoints at the network layer until the upgrade is applied.
  • Remove the loopback exception from the IP allowlist so external requests cannot inherit loopback trust.
  • Restrict access to the authentication endpoint by source IP using firewall rules to reduce the window for shared-ban abuse.
bash
# Example /etc/nginx-ui/app.ini post-upgrade configuration
[auth]
IPWhiteList         = 10.0.0.0/8,192.168.0.0/16
TrustedProxies      = 127.0.0.1
BanThresholdMinutes = 10
MaxAttempts         = 10

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.