CVE-2026-40875 mailcow: dockerized vulnerable to stored XSS in user login history real_rip

High 7.0 Published Updated

Attackers can inject scripts into login history via X-Real-IP header, enabling account takeover and email access through CSRF.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-40875?

CVE-2026-40875 is a high-severity cross-site scripting vulnerability in mailcow-dockerized, published on 21 Apr 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

mailcow: dockerized is an open source groupware/email suite based on docker. In versions prior to 2026-03b, the user dashboard's "Seen successful connections" (login history) renders the client IP from login logs without HTML escaping. Because the server trusts the X-Real-IP header as the source IP for logging, an attacker can inject HTML/JS into this field. This Self-XSS can be exploited by a Login CSRF to force the victim into the attacker's account, and then read emails in a previous browser tab. Version 2026-03b fixes the vulnerability.

Weakness: CWE-80, CWE-79

Which versions are affected by CVE-2026-40875?

How do I fix CVE-2026-40875?

No fix has been published for CVE-2026-40875 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-40875 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40875 exists.

Sources

Also known as GHSA-jprq-w83q-q62h.

Is CVE-2026-40875 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free