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-107581 Overview
CVE-2026-107581 affects Progressive Robot hMailServer versions 6.0.0 through 6.3.5. The vulnerability allows an authenticated IMAP user to trigger quadratic-time processing and excessive memory consumption through specially crafted IMAP commands. Because the IMAP worker threads share a small pool with SMTP and POP3, exploitation causes all three services to stop responding. The flaw combines algorithmic complexity issues ([CWE-407]) with uncontrolled resource consumption ([CWE-400]).
Critical Impact
A signed-in user can hang IMAP, SMTP, and POP3 services simultaneously and force the server to buffer approximately eleven megabytes per command through non-synchronizing literals.
Affected Products
- Progressive Robot hMailServer 6.0.0 through 6.3.5
- IMAP service component (FETCH, SEARCH, SORT parsers)
- Shared worker thread pool serving IMAP, SMTP, and POP3
Discovery Timeline
- 2026-10-08 - CVE-2026-107581 published to NVD
- 2026-10-08 - Last updated in NVD database
Technical Details for CVE-2026-107581
Vulnerability Analysis
The vulnerability stems from multiple parsers in hMailServer that process IMAP command input with quadratic time complexity. The FETCH data-item parser normalizes a BODY[] section using a case-insensitive string replacement that copies the entire item on every occurrence. The item list is split by repeatedly copying the remainder of the command. These copy-on-every-step patterns scale with the square of the input length.
The case-insensitive search routine compares the needle at every position without optimization. A long SEARCH TEXT key run against a message therefore costs the product of the key length and the message length. SEARCH message sets, the saved-result marker $, SORT criteria, HEADER.FIELDS name lists, and UID ranges are each re-parsed once per message instead of once per command.
A FETCH command naming many sections of a message reads and holds every requested section in memory before transmitting any response. Because IMAP allows non-synchronizing literals, a single command may extend across many lines and reach roughly eleven megabytes.
Root Cause
The root cause is a combination of naïve string handling and per-message re-parsing in the IMAP command processors. Repeated full-buffer copies during normalization and splitting produce O(n²) behavior. The shared worker-thread pool amplifies the impact: starving IMAP threads also starves SMTP and POP3.
Attack Vector
An attacker needs valid IMAP credentials to log in. The attacker then issues crafted FETCH, SEARCH, or SORT commands containing long section lists, long search keys, or many repeated section references. Non-synchronizing literals let one command span up to approximately eleven megabytes, maximizing memory and CPU cost. No code execution is required; service availability is the target.
No verified exploit code is available. See the GitLab hMailServer Work Item #68 for parser-level details.
Detection Methods for CVE-2026-107581
Indicators of Compromise
- IMAP sessions issuing FETCH commands with unusually large or repeated BODY[] section lists from a single authenticated account.
- SEARCH or SORT commands containing extremely long TEXT, HEADER.FIELDS, or UID range parameters.
- IMAP command payloads approaching eleven megabytes via chained non-synchronizing literals.
- Sudden unresponsiveness of SMTP and POP3 listeners correlated with IMAP CPU or memory spikes on the hMailServer host.
Detection Strategies
- Alert on IMAP commands whose total length exceeds a conservative threshold such as 64 KB per command.
- Monitor the hMailServer process for sustained high CPU usage combined with rapid resident memory growth.
- Track per-user IMAP command rates and flag accounts generating atypical FETCH or SEARCH volumes.
Monitoring Recommendations
- Enable verbose IMAP protocol logging and ingest it into a SIEM for correlation with service availability metrics.
- Monitor connection and response latency for SMTP and POP3 to detect shared thread-pool starvation.
- Baseline normal IMAP command sizes and alert on statistical outliers from authenticated sessions.
How to Mitigate CVE-2026-107581
Immediate Actions Required
- Upgrade to hMailServer 6.3.6 or later, which addresses the parser complexity and memory consumption issues.
- Audit IMAP account credentials and disable or reset accounts that are inactive, shared, or weakly protected.
- Restrict IMAP access to trusted network segments where possible, pending patching.
Patch Information
The fix is included in hMailServer 6.3.6. Refer to the GitLab hMailServer Release 6.3.6 notes and the associated GitLab hMailServer Work Item #68 for the specific parser changes.
Workarounds
- Enforce strict IMAP command size and session resource limits at a network proxy or mail gateway in front of hMailServer.
- Rate-limit authenticated IMAP sessions per account and per source IP to reduce the ability to saturate the shared worker pool.
- Isolate SMTP and POP3 behind separate network paths or hosts so that an IMAP exhaustion does not cascade across protocols.
# Configuration example: block oversized IMAP command lines at a reverse proxy
# (illustrative - adapt to your environment)
stream {
server {
listen 143;
proxy_pass hmailserver_backend;
proxy_buffer_size 16k;
proxy_timeout 30s;
}
}
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

