hMailServer: SQL injection in MySQL/MariaDB and PostgreSQL database layer
Summary
hMailServer 6.0.0-B1 through 6.2.18 with a MySQL/MariaDB or PostgreSQL database backend does not bind SQL parameters correctly, which allows SQL injection. A value containing the name of a later parameter can end its quoted literal and insert attacker-chosen SQL. An authenticated user who may send mail can reach it in the default configuration by sending to an address of their choosing, and an unauthenticated remote sender can reach it through messages the server sends to the envelope sender, such as bounces or auto-replies. The injected SQL runs with the privileges of the database account; on PostgreSQL further statements can follow, while on MySQL/MariaDB the change stays within one statement. SQL Server and SQL Server Compact are not affected.
Affected
- hMailServer 6.0.0-B1 through 6.2.18
- Only with MySQL/MariaDB or PostgreSQL as database backend
- SQL Server and SQL Server Compact: not affected
Fixed in
- Upgrade to hMailServer 6.2.19 or later, as named in the CVE record.
- 6.2.19 has a fresh-installation problem; the fix is in 6.2.20 (vendor download page, secondary source).
- Current release per vendor site: 6.3.8. The sibling issue CVE-2026-126619 affects up to 6.3.7; its fixed version is not verified.
Workaround
- No complete workaround for affected versions on MySQL/MariaDB or PostgreSQL.
- Keep message indexing (MessageIndexing) and greylisting off, as they are by default; this removes only those two paths.
- Restrict the database account to the privileges it needs.
Exploitation
- No in-the-wild exploitation known at the time of writing.
- No public proof of concept found; CISA KEV and Exploit-DB not yet checked.
- VulDB rates the severity at 7.3; the CNA score is 8.8.
Our recommendation
- Upgrade to 6.2.20 or newer; 6.2.19 fixes the flaw but has a fresh-installation problem.
- Check whether you use MySQL/MariaDB or PostgreSQL. If you use the built-in or MS SQL backend, no action is needed for this CVE.
- Limit which accounts may send mail, and watch database logs for unexpected statements until patched.
- Review CVE-2026-126619 before closing this item.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitLab hMailServer 6.2.19 release gitlab.com
- GitLab work item 101 (issue) gitlab.com
- CVE record mirror CVE-2026-126617 cve.threatint.com
- VulDB entry 435709 vuldb.com
- VulDB entry 435715 (sibling issue) vuldb.com
- Progressive Robot hMailServer 6.2.20 download page www.progressiverobot.com
- hMailServer website www.hmailserver.co.uk
- OffSeq threat page CVE-2026-126617 radar.offseq.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 11 Nov 2026, 10:20.
Original description (NVD)
SQL injection in the database layer of Progressive Robot hMailServer 6.0.0-B1 through 6.2.18, when the server uses MySQL/MariaDB or PostgreSQL, allows a remote attacker to alter SQL statements the server runs. On those two engines parameters are not bound: SQLStatement::GenerateFromCommand wrote each value into the statement's text as a quoted literal with a separate string replacement over the whole text per parameter, so a value holding the name of a parameter substituted after it had that name replaced, inside the value, by the later value with its own quotes, which ended the literal early and placed the later value in the statement as SQL. The row the server writes for each recipient of a queued message carries the recipient's address twice, so in the default configuration an authenticated user who may send mail reaches it by sending to an address of their choosing. A remote unauthenticated sender reaches the same statement through a message the server sends to the envelope sender, such as a delivery failure notice or an automatic reply, and, when greylisting or message indexing is enabled (both are off by default), through the greylisting record's envelope addresses or through the message metadata the server stores for IMAP SORT, which carries four header fields of a received message. An altered statement runs with the privileges of the server's database account; on PostgreSQL, whose client call runs every statement in the text it is given, further statements can follow it, while on MySQL/MariaDB, where one statement is run per call, the change is confined to the statement it is in. SQL Server and SQL Server Compact, where parameters are bound, are not affected.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
