CVE-2025-25198·Docker vulnerability
mailcow: dockerized is an open source groupware/email suite based on docker. Prior to version 2025-01a, a vulnerability in mailcow's password reset functionality allows an attacker to manipulate the `Host HTTP` header to generate a password reset link pointing to an attacker-controlled domain. This can lead to account takeover if a user clicks the poisoned link. Version 2025-01a contains a patch. As a workaround, deactivate the password reset functionality by clearing `Notification email sender` and `Notification email subject` under System -> Configuration -> Options -> Password Settings.
- Severity
- high
- Software
- Docker
- Fixed in
- 2025-01a
- Published
- 2025-02-12
Affected versions
Until: 2025-01a
Fixed in: 2025-01a
How to fix this CVE
Upgrade mailcow to version 2025-01a or later to patch the Host header validation flaw in the password reset mechanism. If immediate patching is not possible, disable the password reset feature by clearing the notification email sender and subject fields in System → Configuration → Options → Password Settings. Monitor for suspicious password reset requests originating from unexpected domains in your mail logs.
sudo dnf update docker-ce docker-ce-cli containerd.io && docker pull mailcow/mailcow-dockerized:2025-01a && cd /opt/mailcow-dockerized && docker compose pull && docker compose up -dDefensia detects this vulnerability
What an exploitation attempt looks like
Sample log line indicative of exploitation attempts:
POST|GET /reset_password.*Host:.*\.(attacker|external|malicious)\..*\nSet-Cookie.*password_reset_token=.*WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement strict Host header validation: only allow requests with Host headers matching your legitimate mailcow domain(s). Block or sanitize password reset links that contain Host headers deviating from your whitelist. Consider adding Content-Security-Policy headers to prevent redirect-based phishing.How to check if you are affected
- Check the mailcow version by running: docker exec mailcow-dockerized cat /etc/os-release | grep VERSION or inspect the mailcow container image tag with: docker images | grep mailcow
- Verify if password reset is enabled by accessing the mailcow admin panel (System → Configuration → Options → Password Settings) and checking if 'Notification email sender' and 'Notification email subject' fields contain values
- Search mailcow and postfix logs for suspicious password reset requests with Host headers pointing to external domains: grep -r 'password.*reset' /var/log/mail.log | grep -v 'localhost\|127.0.0.1\|your-domain.com'
- Confirm the patched version is running by executing: docker inspect mailcow-dockerized | grep 'Image.*2025-01a' or checking the mailcow container changelog for version 2025-01a markers
Indicators of compromise
- Password reset emails with sender domain not matching organizational mail server
- HTTP requests to mailcow reset endpoint with Host header pointing to external domains
- Unexpected password reset tokens in mail logs with mismatched HTTP Host headers
FAQ
What is CVE-2025-25198?
CVE-2025-25198 is a Host header injection vulnerability in mailcow's password reset functionality that allows attackers to craft malicious password reset links pointing to attacker-controlled servers, potentially leading to credential theft and account takeover.
Is CVE-2025-25198 being actively exploited?
While not listed in the CISA KEV catalog as actively exploited, public proof-of-concept code exists (Exploit-DB #52485), making opportunistic exploitation likely if systems remain unpatched.
What versions of Docker are affected by CVE-2025-25198?
All mailcow versions prior to 2025-01a are affected. The vulnerability exists in the password reset email generation logic, not in Docker itself, but affects Docker-based mailcow deployments.
How do I check if my server is vulnerable to CVE-2025-25198?
Run: docker exec mailcow-dockerized /bin/bash -c 'grep -i "version" /etc/os-release' and compare the version number against 2025-01a. If the version is earlier, your deployment is vulnerable.
Does Defensia detect CVE-2025-25198?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Docker and mailcow are installed on a monitored server, CVE-2025-25198 will appear in your dashboard with remediation steps.
Related Docker CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-25198. Free for 1 server.
Get started free