Skip to content

Remote Code Execution via Shell Injection in qmail-remote TLS Error Handler#42

Merged
sagredo-dev merged 2 commits intomainfrom
qmail-remote-injection-fix
Apr 7, 2026
Merged

Remote Code Execution via Shell Injection in qmail-remote TLS Error Handler#42
sagredo-dev merged 2 commits intomainfrom
qmail-remote-injection-fix

Conversation

@sagredo-dev
Copy link
Copy Markdown
Owner

Thanks to Diep Pham, who spotted this vulnerability.

When an outbound TLS handshake fails, qmail-remote automatically records the remote hostname in a blocklist file by executing a shell command constructed from the unsanitized DNS MX exchange name. An attacker who controls DNS records for a domain can embed shell metacharacters in the MX hostname, achieving arbitrary command execution on the mail server as the qmailr user. The vulnerability requires the control/notlshosts_auto feature to be enabled (a documented production feature for handling broken TLS hosts) and for the victim server to send or relay email to the attacker-controlled domain.

@sagredo-dev sagredo-dev merged commit 122b803 into main Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant