Skip to main content
Vulnerability Database/CVE-2026-107582

CVE-2026-107582: hMailServer REST API and IMAP DOS Vulnerability

CVE-2026-107582 is a denial of service vulnerability in Progressive Robot hMailServer affecting REST API and IMAP PREVIEW. Attackers can render webmail and admin console unavailable through inefficient algorithmic complexity. This post covers technical details, affected versions 6.2.22-6.3.5, impact analysis, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-107582 Overview

CVE-2026-107582 is an algorithmic complexity vulnerability [CWE-407] in Progressive Robot hMailServer. The flaw affects the REST API in versions 6.3.3 through 6.3.5 and the IMAP PREVIEW response in versions 6.2.22 through 6.3.5. A remote unauthenticated attacker can send a single HTML-only email containing a large number of character entity references. When the recipient's webmail lists the folder, the server's string replacement routine runs in quadratic time, consuming one of four worker threads for minutes. A few folder listings exhaust the HTTP listener and make the webmail, administration console, and REST API unavailable.

Critical Impact

An unauthenticated attacker can disable the webmail, administration console, REST API, and IMAP preview service by delivering a single crafted HTML message.

Affected Products

  • Progressive Robot hMailServer REST API, versions 6.3.3 through 6.3.5
  • Progressive Robot hMailServer IMAP PREVIEW response, versions 6.2.22 through 6.3.5
  • Fixed in Progressive Robot hMailServer 6.3.6

Discovery Timeline

  • 2026-10-08 - CVE-2026-107582 published to NVD
  • 2026-10-08 - Last updated in NVD database

Technical Details for CVE-2026-107582

Vulnerability Analysis

The vulnerability resides in hMailServer's shared string class. Its replace and remove methods execute in quadratic time relative to the number of substitutions performed. To render a snippet for each message in a folder list, the server decodes HTML character entity references in messages that contain an HTML part but no text part. Each decoding pass invokes the quadratic string routine.

A message containing a very large number of entity references forces the decoder into O(n²) behavior. One of the listener's four worker threads then stalls for minutes or longer per folder listing. A small number of listings exhausts the thread pool, blocking all further HTTP requests to the webmail, administration console, and REST API.

The IMAP PREVIEW response invokes the same decoding path. Each client requesting the preview of such a message holds an IMAP thread for the same duration, extending the denial of service to the IMAP service.

Root Cause

The shared string class performs successive scans of the full buffer for every substitution. When processing a large count of entity references, the cumulative work grows with the square of their number. The decoder uses this routine without bounding input size or switching to a linear-time replacement algorithm.

Attack Vector

An attacker sends an HTML-only email containing many character entity references to any mailbox hosted on the server. No authentication is required to send the message. Exploitation triggers when the recipient's webmail client lists the folder or when any IMAP client requests PREVIEW for the message. The message does not need to be opened.

See the GitLab hMailServer Work Item #67 for upstream technical details.

Detection Methods for CVE-2026-107582

Indicators of Compromise

  • Inbound SMTP messages with HTML-only body parts containing abnormally high counts of character entity references such as &, <, or numeric entities.
  • hMailServer worker threads sustaining 100% CPU for minutes while processing a single folder listing or IMAP PREVIEW request.
  • HTTP 503 responses or timeouts from the webmail, administration console, and REST API endpoints without corresponding traffic spikes.

Detection Strategies

  • Parse inbound SMTP traffic and flag HTML-only messages whose entity reference count exceeds a reasonable threshold for legitimate mail.
  • Monitor the four hMailServer HTTP worker threads for long-running stalls correlated to IMAP FETCH or REST folder-list operations.
  • Alert on repeated REST API or webmail unavailability events that recover only after service restart.

Monitoring Recommendations

  • Enable verbose logging on IMAP PREVIEW and REST folder-listing endpoints to capture per-request processing time.
  • Track thread pool saturation metrics and queue depth for the HTTP listener.
  • Correlate SMTP ingress logs with subsequent webmail unresponsiveness to identify the triggering message.

How to Mitigate CVE-2026-107582

Immediate Actions Required

  • Upgrade hMailServer to version 6.3.6 or later, which replaces the quadratic string routines.
  • Identify and quarantine any HTML-only messages already delivered that contain large numbers of entity references.
  • Restart the hMailServer service to free any threads currently stalled by exploitation attempts.

Patch Information

Progressive Robot released the fix in hMailServer v6.3.6. The release corrects the replace and remove methods in the shared string class so entity decoding completes in linear time.

Workarounds

  • Restrict REST API and administration console access to trusted networks until the patch is applied.
  • Deploy an SMTP content filter that rejects or strips HTML parts exceeding a defined entity reference count.
  • Disable the IMAP PREVIEW capability on client applications where it is non-essential to limit exposure through that code path.
bash
# Example SMTP filter rule concept: drop HTML-only messages
# whose character entity reference count exceeds a safe threshold.
# Replace THRESHOLD with a value appropriate for your mail flow.
THRESHOLD=5000
grep -oE '&(#[0-9]+|#x[0-9a-fA-F]+|[a-zA-Z]+);' message.eml | wc -l | \
  awk -v t=$THRESHOLD '{ if ($1 > t) exit 1 }'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.