CVE-2026-24031 is an SQL injection vulnerability in Dovecot's SQL-based authentication handling. The flaw is a regression affecting Dovecot CE 2.4.0 and Dovecot Pro 3.1.0 and occurs when an administrator clears the auth_username_chars setting, removing the expected username character restrictions. Under that configuration, crafted username input can be injected into SQL-backed authentication logic, allowing authentication checks to be bypassed. The issue affects SQL-backed passdb authentication and also enables user enumeration. Fixed releases include OX Dovecot CE core 2.4.3 and OX Dovecot Pro core 3.1.4.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.
Repository contains a working Python 3 proof-of-concept exploit for CVE-2026-24031, a Dovecot SQL authentication bypass caused by unsafe interpolation of %{user} into SQL passdb queries when auth_username_chars is empty. The main exploit file is cve-2026-24031-poc.py, which connects to IMAP/IMAPS or POP3/POP3S, auto-detects TLS/plain mode, and sends crafted usernames to exploit the vulnerable authentication flow. Its primary capability is arbitrary account impersonation: it injects a UNION SELECT row returning the chosen victim username and an attacker-controlled {PLAIN} password, then authenticates with that password to obtain a successful login as the victim. A secondary capability is vulnerability fingerprinting and user enumeration using an OR-based SQLi probe that causes distinguishable server responses such as temporary authentication failure versus normal authentication failure. The exploit is self-contained and uses only Python standard library modules (ssl, socket, base64, time, os, sys). It supports configurable target host, port, delay, protocol, and optional environment variables CVE24031_USER and CVE24031_PASS to choose the impersonated account and injected password. The code is operational rather than framework-based: it performs real network authentication attempts and reports bypass success, but payload customization is limited to simple hardcoded SQL templates. Repository structure also includes a reproducible Docker lab under lab/: docker-compose.yml orchestrates a vulnerable Dovecot 2.4.0 instance and PostgreSQL 16; dovecot/Dockerfile-2.4.0 builds Dovecot from the official tarball and writes an intentionally vulnerable configuration; postgres/init.sql seeds test users. Helper scripts run.sh and demo.sh automate lab startup and demonstration. README.md and docs/example-output.txt document the vulnerability, exploitation steps, affected/fixed versions, and sample successful output. Overall purpose of the repository is to demonstrate and validate unauthenticated authentication bypass and user enumeration against vulnerable Dovecot SQL-backed authentication deployments.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
8 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.
No news coverage yet. Advisories and community discussion only.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.