CVE-2026-103647: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in hMailServer
Cross-site scripting in the webmail of Progressive Robot hMailServer 6.3.2 through 6.3.5 allows a remote attacker who can send a user an encrypted message to run script in the webmail's origin with that user's session. When the webmail decrypted an S/MIME message (from 6.3.2) or an OpenPGP message (from 6.3.4) in the browser, it offered each decrypted attachment as a blob URL of the media type the message declared for it. A click saved the file, but if the user opened the attachment in a new tab, a part declared as text/html was rendered as a document of the webmail's origin and its script could read the mailbox, send mail and change the account through the REST API. The webmail is served only when the REST API is enabled, which it is not by default.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Progressive Robot hMailServerto a version that resolves this vulnerability.Fixed in 6.3.6 - Configuration
Keep the REST API disabled by setting RestApiPort to 0.
hMailServer webmail REST API RestApiPort = 0 - Compensating control
Tell webmail users not to open decrypted attachments in a new tab.
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments running hMailServer 6.3.2 through 6.3.5 with the REST API enabled are exposed through webmail. The REST API, and therefore webmail, is not enabled by default.
What must an attacker and victim do for exploitation to succeed?
An attacker must be able to send the victim an encrypted S/MIME message in versions from 6.3.2, or an encrypted OpenPGP message in versions from 6.3.4, containing an attachment declared as text/html. The victim must decrypt the message in webmail and open that attachment in a new tab.
What could successful exploitation allow?
Script rendered from the attachment runs under the webmail origin using the victim's session. It can read the mailbox, send mail, and change the account through the REST API.
What is the available remediation?
The affected range ends at 6.3.5, and a v6.3.6 release is referenced. If updating cannot happen immediately, disabling the REST API removes the webmail exposure described here.