# CVE-2022-31138: OS Command Injection in mailcow

- Severity: High 8.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.50%, higher than 89% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2022-07-11T14:00:15.000Z
- Modified: 2026-06-17T04:44:53.110Z
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- mailcow mailcow-dockerized: < 2022-06a
- mailcow mailcow:_dockerized: before 2022-06a

## Every score

- GitHub_M: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 9.0 High `AV:N/AC:L/Au:S/C:C/I:C/A:C`

## References

- <https://github.com/ly1g3/Mailcow-CVE-2022-31138> (exploit, third-party-advisory)
- <https://github.com/mailcow/mailcow-dockerized/security/advisories/GHSA-vx9w-h33p-5vhc> (mitigation, third-party-advisory)
- <https://github.com/mailcow/mailcow-dockerized/commit/d373164e13a14e058f82c9f1918a5612f375a9f9> (patch, third-party-advisory)
- <https://github.com/mailcow/mailcow-dockerized/releases/tag/2022-06a> (release-notes, third-party-advisory)

## Sources

- CVE List: [CVE-2022-31138](https://www.cve.org/CVERecord?id=CVE-2022-31138), CVE Terms of Use, modified 2025-04-22
- NVD: [CVE-2022-31138](https://nvd.nist.gov/vuln/detail/CVE-2022-31138), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31138 · Whole record: https://cve.day/CVE-2022-31138.json · Rebuilt by cve.day 2026-11-25T22:58:12.806Z
