What’s Vulnerable › Vulnerabilities
CVE-2022-31138: OS Command Injection in mailcow
- Severity: high (CVSS 8.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 3.3% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2022-07-11 · updated 2026-06-17
- Weakness: CWE-78
Description
mailcow is a mailserver suite. Prior to mailcow-dockerized version 2022-06a, an extended privilege vulnerability can be exploited by manipulating the custom parameters regexmess, skipmess, regexflag, delete2foldersonly, delete2foldersbutnot, regextrans2, pipemess, or maxlinelengthcmd to execute arbitrary code. Users should update their mailcow instances with the `update.sh` script in the mailcow root directory to 2022-06a or newer to receive a patch for this issue. As a temporary workaround, the Syncjob ACL can be removed from all mailbox users, preventing changes to those settings.
Affected products
- mailcow-dockerized: before 2022-06a — fixed in 2022-06a
How to fix
Upgrade to a fixed version: mailcow-dockerized 2022-06a. Check the vendor advisory for mitigations.
References
- https://github.com/ly1g3/Mailcow-CVE-2022-31138
- https://github.com/mailcow/mailcow-dockerized/commit/d373164e13a14e058f82c9f1918a5612f375a9f9
- https://github.com/mailcow/mailcow-dockerized/releases/tag/2022-06a
- https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-vx9w-h33p-5vhc
- https://github.com/ly1g3/Mailcow-CVE-2022-31138
- https://github.com/mailcow/mailcow-dockerized/commit/d373164e13a14e058f82c9f1918a5612f375a9f9
- https://github.com/mailcow/mailcow-dockerized/releases/tag/2022-06a
- https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-vx9w-h33p-5vhc
Get alerted when CVE-2022-31138 or the next vulnerability affects your stack