CVE-2023-26490 mailcow is vulnerable to shell command injection via xoauth2 authentication in imapsync​

High 7.3 Published Updated

A malicious user with Sync Job permissions can execute arbitrary shell commands in the Dovecot container via imapsync XOAUTH2 handling.

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

What is CVE-2023-26490?

CVE-2023-26490 is a high-severity command injection vulnerability in mailcow-dockerized, published on 3 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

mailcow is a dockerized email package, with multiple containers linked in one bridged network. The Sync Job feature - which can be made available to standard users by assigning them the necessary permission - suffers from a shell command injection. A malicious user can abuse this vulnerability to obtain shell access to the Docker container running dovecot. The imapsync Perl script implements all the necessary functionality for this feature, including the XOAUTH2 authentication mechanism. This code path creates a shell command to call openssl. However, since different parts of the specified user password are included without any validation, one can simply execute additional shell commands. Notably, the default ACL for a newly-created mailcow account does not include the necessary permission. The Issue has been fixed within the 2023-03 Update (March 3rd 2023). As a temporary workaround the Syncjob ACL can be removed from all mailbox users, preventing from creating or changing existing Syncjobs.

Weakness: CWE-78

Which versions are affected by CVE-2023-26490?

It affects 1 product.

Products include Mailcow Mailcow\.

How do I fix CVE-2023-26490?

No fix has been published for CVE-2023-26490 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-2023-26490 being exploited?

There is no known exploitation of CVE-2023-26490 in the wild and no public exploit code.

Sources

Also known as GHSA-3j2f-wf52-cjg7.

Is CVE-2023-26490 in your software?

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

Check your SBOMs for free