{"id":"CVE-2026-107581","state":"PUBLISHED","title":"Inefficient Algorithmic Complexity in hMailServer","description":"Progressive Robot hMailServer 6.0.0 through 6.3.5 processes several IMAP commands from a signed-in account in time quadratic in the command's length or in the number of elements it names, and can be made to hold memory out of proportion to a command. The FETCH data-item parser normalised a BODY[] section with a case-insensitive string replacement that copied the whole item per occurrence and split the item list by repeatedly copying the remainder of the command; the server's case-insensitive search compared a needle afresh at every position, so a long SEARCH TEXT key over a message cost the product of the two lengths; SEARCH message sets and the saved-result marker ($), SORT criteria, HEADER.FIELDS name lists and UID ranges were each read once per message rather than once per command; and a FETCH naming a message's sections very many times read and held every section in memory before sending any. An IMAP command may continue past one line through non-synchronizing literals, so one command can reach about eleven megabytes. The IMAP worker threads are a small pool shared with SMTP and POP3, so a signed-in user sending such commands can make the IMAP, SMTP and POP3 services stop responding (CWE-407) and can consume excessive memory (CWE-400).","publishedAt":"2026-10-08T11:47:16.084Z","updatedAt":"2026-10-08T14:19:53.760Z","severity":{"score":6.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","source":"GitLab"},"assigner":"GitLab","products":["Progressive Robot Ltd hMailServer"],"affected":[{"vendor":"Progressive Robot Ltd","product":"hMailServer","defaultStatus":"unaffected","versions":[{"version":"6.0.0","status":"affected","lessThan":"6.3.6","versionType":"semver"}],"repo":"https://gitlab.com/hmailserver/hmailserver"}],"references":["https://gitlab.com/hmailserver/hmailserver/-/work_items/68","https://gitlab.com/hmailserver/hmailserver/-/releases/v6.3.6"],"weaknesses":["CWE-407"],"ingestedAt":"2026-10-29T20:10:23.711Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/107xxx/CVE-2026-107581.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-107581","state":"PUBLISHED","datePublished":"2026-10-08T11:47:16.084Z","dateUpdated":"2026-10-08T14:19:53.760Z","assignerShortName":"GitLab","assignerOrgId":"ceab7361-8a18-47b1-92ba-4d7d25f6715a","dateReserved":"2026-10-08T10:52:10.640Z"},"containers":{"cna":{"title":"Inefficient Algorithmic Complexity in hMailServer","descriptions":[{"lang":"en","value":"Progressive Robot hMailServer 6.0.0 through 6.3.5 processes several IMAP commands from a signed-in account in time quadratic in the command's length or in the number of elements it names, and can be made to hold memory out of proportion to a command. The FETCH data-item parser normalised a BODY[] section with a case-insensitive string replacement that copied the whole item per occurrence and split the item list by repeatedly copying the remainder of the command; the server's case-insensitive search compared a needle afresh at every position, so a long SEARCH TEXT key over a message cost the product of the two lengths; SEARCH message sets and the saved-result marker ($), SORT criteria, HEADER.FIELDS name lists and UID ranges were each read once per message rather than once per command; and a FETCH naming a message's sections very many times read and held every section in memory before sending any. An IMAP command may continue past one line through non-synchronizing literals, so one command can reach about eleven megabytes. The IMAP worker threads are a small pool shared with SMTP and POP3, so a signed-in user sending such commands can make the IMAP, SMTP and POP3 services stop responding (CWE-407) and can consume excessive memory (CWE-400)."}],"affected":[{"vendor":"Progressive Robot Ltd","product":"hMailServer","defaultStatus":"unaffected","versions":[{"version":"6.0.0","status":"affected","lessThan":"6.3.6","versionType":"semver"}],"repo":"https://gitlab.com/hmailserver/hmailserver"}],"references":[{"url":"https://gitlab.com/hmailserver/hmailserver/-/work_items/68"},{"url":"https://gitlab.com/hmailserver/hmailserver/-/releases/v6.3.6"}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":6.5,"baseSeverity":"MEDIUM"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-407","lang":"en","description":"CWE-407: Inefficient Algorithmic Complexity","type":"CWE"}]}],"providerMetadata":{"shortName":"GitLab","orgId":"ceab7361-8a18-47b1-92ba-4d7d25f6715a","dateUpdated":"2026-10-08T11:47:16.084Z"},"solutions":[{"lang":"en","value":"Upgrade to hMailServer 6.3.6, which parses the FETCH command and runs the server's case-insensitive string operations in a single pass, reads each SEARCH and UID set and HEADER.FIELDS list once per command, substitutes the saved-result marker once, and refuses a FETCH whose sections add up to many times the message before sending any. There is no configuration workaround; the commands require only a signed-in account. Restricting IMAP access to trusted accounts and networks reduces who can send them."}],"credits":[{"lang":"en","value":"Found in the hMailServer project's own security review (Progressive Robot Ltd)","type":"finder"}]},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-10-08T14:18:56.518928Z","id":"CVE-2026-107581","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-08T14:19:53.760Z"}}]}}}