CVE-2023-34108 Manipulation of Internal Dovecot Variables in mailcow via crafted Passwords
An authenticated attacker can manipulate internal Dovecot variables via crafted passwords, leading to unauthorized access or security control bypasses.
- 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-2023-34108?
CVE-2023-34108 is a high-severity command injection vulnerability in mailcow-dockerized, published on 7 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
mailcow is a mail server suite based on Dovecot, Postfix and other open source software, that provides a modern web UI for user/server administration. A vulnerability has been discovered in mailcow which allows an attacker to manipulate internal Dovecot variables by using specially crafted passwords during the authentication process. The issue arises from the behavior of the `passwd-verify.lua` script, which is responsible for verifying user passwords during login attempts. Upon a successful login, the script returns a response in the format of "password=<valid-password>", indicating the successful authentication. By crafting a password with additional key-value pairs appended to it, an attacker can manipulate the returned string and influence the internal behavior of Dovecot. For example, using the password "123 mail_crypt_save_version=0" would cause the `passwd-verify.lua` script to return the string "password=123 mail_crypt_save_version=0". Consequently, Dovecot will interpret this string and set the internal variables accordingly, leading to unintended consequences. This vulnerability can be exploited by an authenticated attacker who has the ability to set their own password. Successful exploitation of this vulnerability could result in unauthorized access to user accounts, bypassing security controls, or other malicious activities. This issue has been patched in version `2023-05a`. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Weakness: CWE-78
Which versions are affected by CVE-2023-34108?
It affects 1 product.
Products include Mailcow Mailcow\.
How do I fix CVE-2023-34108?
No fix has been published for CVE-2023-34108 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-34108 being exploited?
There is no known exploitation of CVE-2023-34108 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-2022-31138 OS Command Injection in mailcow
- CVE-2022-31245 Command injection in n/a
- CVE-2017-8928 Cross-site request forgery in n/a
Sources
Also known as GHSA-mhh4-qchc-pv22.