8.8high
OS Command Injection in mailcow
- Severity
- 8.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 3.50% (higher than 89% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mailcow mailcow-dockerized | < 2022-06a | CVE List |
| mailcow mailcow:_dockerized | before 2022-06a | NVD |
All scores
| GitHub_M | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 8.8high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.0high CVSS:2.0 | AV:N/AC:L/Au:S/C:C/I:C/A:C |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
mailcow es una suite de servidores de correo. En versiones anteriores a 2022-06a de mailcow-dockerized, una vulnerabilidad de privilegio extendido puede ser explotada al manipular los parámetros personalizados regexmess, skipmess, regexflag, delete2foldersonly, delete2foldersbutnot, regextrans2, pipemess, o maxlinelengthcmd para ejecutar código arbitrario. Los usuarios deben actualizar sus instancias de mailcow con el script "update.sh" en el directorio root de mailcow a 2022-06a o más reciente para recibir un parche para este problema. Como mitigación solución temporal, puede eliminarse la ACL de Syncjob de todos los usuarios de buzones de correo, impidiendo que sean realizados cambios en dicha configuración
References
| 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/ly1g3/Mailcow-CVE-2022-31138 | exploit, third-party-advisory | |
| https://github.com/mailcow/mailcow-dockerized/releases/tag/2022-06a | release-notes, third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31138 changed 2025-04-22 | CVE Terms of Use |
| NVD | CVE-2022-31138 changed 2026-06-17 | Public domain |