Summary
CVE-2026-85751 is a critical authentication bypass vulnerability affecting Mailu, an open-source mail server suite distributed as a set of Docker containers. When Mailu is configured to use header-based proxy authentication via PROXY_AUTH_WHITELIST without also setting REAL_IP_HEADER, an unauthenticated remote attacker can spoof the X-Forwarded-By header to impersonate a trusted proxy and bypass authentication entirely. The flaw carries a CVSS v3.1 base score of 9.8 (Critical).
Technical details
- Root cause: Mailu’s nginx configuration uses the
proxy_hide_headerdirective to strip theX-Forwarded-Byheader from responses sent to the client, but this directive does not overwrite or block that same header on incoming requests. As a result, a client-suppliedX-Forwarded-Byvalue is passed through to the application as if it originated from a trusted reverse proxy. - Trigger conditions: The vulnerability is only exploitable when an administrator has enabled
PROXY_AUTH_WHITELIST(header-based proxy authentication) without also configuringREAL_IP_HEADER. Mailu’s documentation did not clearly mandateREAL_IP_HEADERas a prerequisite for safely usingPROXY_AUTH_WHITELIST, making misconfiguration likely. - Attack vector: Network — no authentication or user interaction is required. An attacker simply sends a crafted HTTP request containing a forged
X-Forwarded-Byheader to the exposed Mailu instance. - Impact: Successful exploitation allows an unauthenticated attacker to bypass authentication, resulting in full compromise of confidentiality, integrity, and availability of the mail platform.
- The flaw was originally introduced via a code change in Mailu’s nginx proxy configuration merged as part of the 2.0 release line.
Affected software
- Mailu: versions 2.0 through 2024.06.54
- Mailu helm-charts: versions prior to 2.7.3
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade Mailu to version 2024.06.55 or later, and upgrade the Mailu helm-charts to version 2.7.3 or later.
- If immediate patching is not possible: Ensure
REAL_IP_HEADERis properly configured on any deployment that usesPROXY_AUTH_WHITELIST, so that client-supplied proxy-identity headers such asX-Forwarded-Bycannot be spoofed. Alternatively, disablePROXY_AUTH_WHITELISTuntil the upgrade can be applied.

