CVE-2022-31138 OS Command Injection in mailcow

High 8.8 Published Updated

Attackers can execute arbitrary code by manipulating specific sync job parameters in mailcow, requiring an upgrade to patch.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2022-31138?

CVE-2022-31138 is a high-severity command injection vulnerability in mailcow-dockerized, published on 11 Jul 2022. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-78

Which versions are affected by CVE-2022-31138?

It affects 1 product.

Products include Mailcow Mailcow\.

How do I fix CVE-2022-31138?

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

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2022-31138 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-vx9w-h33p-5vhc.

Is CVE-2022-31138 in your software?

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

Check your SBOMs for free