Progressive Robot Ltd hMailServer
Inefficient Algorithmic Complexity in hMailServer
Inefficient algorithmic complexity in the inbound DKIM and ARC signature verification of Progressive Robot hMailServer 6.0.0 through 6.3.5 allows a remote unauthenticated attacker to make the mail services unavailable by sending a message. Building the canonical header and choosing the header fields named in a signature's h= tag took time growing with the square of the message's header: the 'simple' canonicalisation prepended each continuation line of a folded field to the lines already gathered, and both canonicalisations searched the gathered fields from the bottom for each h= name and erased the match from the middle of the list. A message whose header holds very many fields, or a field folded over very many lines, with a DKIM-Signature the attacker signs for a domain they control, keeps a worker thread busy for tens of seconds per signature; up to ten signatures are evaluated per message by each of the DKIM and DMARC tests, on the threads that serve delivery and SMTP.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 6.0.0, < 6.3.6
Fixed in 6.3.6
Mitigation
Upgrade to hMailServer 6.3.6, which builds the canonical header in one pass and chooses the h= fields from an index by name. Until then, lower the maximum message size, which bounds the cost.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.