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

CVE-2026-86009: Mailu Mail Server Auth Bypass Vulnerability

CVE-2026-86009 is an authentication bypass flaw in Mailu mail server allowing domain managers to enable email spoofing for domains they do not control. This post explains its impact, affected versions, and mitigation steps.

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-86009 Overview

CVE-2026-86009 affects Mailu, a mail server distributed as a set of Docker images. A broken access control flaw [CWE-285] in the allow_spoofing lookup allows a domain manager of one hosted domain to enable spoofing for a different hosted domain they do not control. The attacker can then send emails that pass DomainKeys Identified Mail (DKIM) and Sender Policy Framework (SPF) authentication for domains outside their authority. The issue is fixed in commit f05aeb8322e2f61096af6b089d61ba6f40587d96.

Critical Impact

A privileged domain manager can send DKIM/SPF-authenticated email as any other hosted domain, enabling convincing phishing and brand impersonation against recipients that trust the Mailu instance.

Affected Products

  • Mailu mail server (Docker image distribution)
  • Mailu core/admin component responsible for Postfix sender authorization
  • All Mailu versions prior to commit f05aeb8322e2f61096af6b089d61ba6f40587d96

Discovery Timeline

  • 2026-10-16 - CVE-2026-86009 published to the National Vulnerability Database
  • 2026-10-21 - Last updated in NVD database

Technical Details for CVE-2026-86009

Vulnerability Analysis

Mailu lets administrators grant individual users the allow_spoofing flag, which permits authenticating as other senders. The Postfix sender authorization endpoint queries every user with allow_spoofing=True without filtering by domain. A domain manager who legitimately controls one hosted domain can set the flag on an account and have it honored as a valid sender for any other hosted domain on the same Mailu instance.

Because the resulting outbound message is relayed by the Mailu Postfix instance that owns the DKIM private keys for all hosted domains, the forged mail is signed with the victim domain's DKIM key and passes SPF alignment. Downstream mail receivers treat the message as authenticated, defeating standard DMARC-based anti-spoofing controls.

Root Cause

The root cause is a missing authorization scope in core/admin/mailu/internal/views/postfix.py. The vulnerable query enumerated all allow_spoofing users globally. The fix scopes the query to the sender's own domain by adding domain_name=domain_name to the filter_by call, preventing cross-domain privilege reuse.

Attack Vector

Exploitation requires an authenticated domain manager account on a multi-tenant Mailu deployment. The attacker toggles allow_spoofing on a user they manage, then submits SMTP mail with a MAIL FROM address belonging to a different hosted domain. The Postfix policy daemon approves the sender and the server signs and relays the forged mail.

python
     localpart = localpart[:next((i for i, ch in enumerate(localpart) if ch in flask.current_app.config.get('RECIPIENT_DELIMITER')), None)]
     destinations = set(models.Email.resolve_destination(localpart, domain_name, True) or [])
     destinations.update(wildcard_senders)
-    destinations.update(i[0] for i in models.User.query.filter_by(allow_spoofing=True).with_entities(models.User.email).all())
+    # allow_spoofing lets a user authenticate as other senders, but only within
+    # their own domain — scoping the lookup to the sender's domain prevents a
+    # domain manager from granting themselves cross-domain spoofing (#2686).
+    destinations.update(i[0] for i in models.User.query.filter_by(allow_spoofing=True, domain_name=domain_name).with_entities(models.User.email).all())
     if destinations:
         return flask.jsonify(",".join(idna_encode(destinations)))
     return flask.abort(404)

Source: Mailu patch commit f05aeb8. The patch restricts the allow_spoofing lookup to the sender's own domain.

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-86009

Indicators of Compromise

  • Outbound messages where the authenticated SMTP user's domain does not match the MAIL FROM or From: header domain.
  • Audit log entries showing allow_spoofing being toggled on user accounts by domain managers who do not own the target recipient's domain.
  • Unexpected DKIM-signed mail originating from the Mailu instance for domains whose administrators did not send it.

Detection Strategies

  • Query the Mailu admin database for users with allow_spoofing=True and correlate the user's domain_name against mail sent from other hosted domains.
  • Parse Postfix smtpd logs to identify SASL-authenticated sessions where the authenticated identity's domain differs from the envelope sender domain.
  • Review DMARC aggregate (RUA) reports from external receivers for unexpected pass results originating from the Mailu relay IPs.

Monitoring Recommendations

  • Alert on administrative changes to the allow_spoofing attribute, especially when set by non-superuser accounts.
  • Track SMTP submission volume per authenticated user and flag spikes or new sender-domain patterns.
  • Forward Postfix and Mailu admin audit logs into a central analytics platform to retain cross-domain sender history for forensic review.

How to Mitigate CVE-2026-86009

Immediate Actions Required

  • Upgrade Mailu to a build that includes commit f05aeb8322e2f61096af6b089d61ba6f40587d96 or later.
  • Audit all accounts with allow_spoofing=True and disable the flag on any user that does not require it.
  • Review recent outbound mail logs for sender-domain mismatches and notify impacted domain owners if abuse is confirmed.

Patch Information

The fix is published in Mailu commit f05aeb8322e2f61096af6b089d61ba6f40587d96 and tracked in GitHub Pull Request #4072, GitHub Issue #2686, and GHSA-crww-m82r-2wfm. The patch scopes the allow_spoofing database query to the sender's own domain in core/admin/mailu/internal/views/postfix.py.

Workarounds

  • Until patching is possible, set allow_spoofing=False on every user across all hosted domains to neutralize the cross-domain lookup.
  • Restrict the domain-manager role to trusted operators and avoid granting multi-tenant admin access to untrusted parties.
  • Enforce strict DMARC policies on hosted domains and monitor aggregate reports to detect abuse originating from the Mailu relay.
bash
# Verify the installed Mailu admin image includes the fix commit
docker exec mailu_admin_1 git -C /app log --oneline | grep f05aeb8

# List all users currently permitted to spoof senders
docker exec mailu_admin_1 flask mailu config-dump users \
  | jq '.users[] | select(.allow_spoofing==true) | {email, domain_name}'

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.