CVE-2023-26490 mailcow is vulnerable to shell command injection via xoauth2 authentication in imapsync
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.
Other vulnerabilities in mailcow-dockerized
- CVE-2025-53909 mailcow: dockerized vulnerable to SSTI in Quota and Quarantine Notification Template
- CVE-2024-24760 Mailcow Docker Container Exposure to Local Network
- CVE-2023-34108 Manipulation of Internal Dovecot Variables in mailcow via crafted Passwords
- CVE-2022-31138 OS Command Injection in mailcow
- CVE-2022-31245 Command injection in n/a
Sources
Also known as GHSA-3j2f-wf52-cjg7.