HMAILSERVER · CVE-2026-126617 · Package
NO FIX YET · SEE WHAT TO DO
hMailServer's database layer builds SQL on MySQL, MariaDB and PostgreSQL by pasting parameter values into statement text, so a crafted value can break out of its quotes. A remote sender, even unauthenticated in some paths, can change the SQL the server runs under its database account.
first public Nov 11, 2026 · 2 sources
Could this affect your app?
Free first check from your website. Connect your repo for the full answer.
Mail servers running hMailServer 6.0.0-B1 through 6.2.18 on MySQL, MariaDB or PostgreSQL are exposed, because the flaw is in how the server writes recipient rows to its database. An authenticated user who can send mail reaches it in the default configuration, and unauthenticated senders reach it through bounce or auto-reply messages, and through greylisting or IMAP SORT indexing when those are enabled. SQL Server and SQL Server Compact installs are not affected.
Not affected if patched-version, sql-server-backend
Who cares hmailserver, mail-server, mariadb, mysql, postgresql
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.
Check it with your coding agent
It reads this page and tells you if your code is affected.
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
6.3.8 (2 Nov 2026), and check the GitLab advisory for this CVE once publishedNVD data is provided by NIST and is public domain. Posts quoted belong to their authors.