All vulnerabilities

Servers and applications

GHSA-3v65-6jq9-v3hw

Unauthenticated memory exhaustion through PDF attachment text extraction

Severity
High 7.5
Published
3 Dec 2026
Last changed
3 Dec 2026
Added to UpHeron
3 Dec 2026
Fixed in
1.2.3
Weakness
Allocation without limits (CWE-770)
Attack
Over the network · No login needed · No user action needed
Attacker can
Take it down
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Sources
Project advisories (GitHub)

Description

Stalwart extracts the text of PDF attachments when it indexes messages for search, which the default Search.indexEmailFields setting enables. A small crafted PDF can make that extraction allocate gigabytes of memory. In the reported case, a 10 KB attachment holding a marked-content /ActualText string with millions of Arabic presentation forms (U+FDFA) made the server allocate about 3.3 GB.

Anyone who can deliver mail to a local mailbox, including an unauthenticated sender over SMTP, can trigger it with one message. On hosts without enough free memory the operating system kills the server process, taking down SMTP, IMAP, JMAP and HTTP together. The message stays in the index queue, so the server is killed again within seconds of every restart until attachment indexing is disabled.

The text-line builder appended an /ActualText string in one piece and checked the line length limit only afterwards.

From stalwartlabs/stalwart's security advisory. Shortened; the full text is there.

Workarounds

Remove attachment from Search.indexEmailFields and set indexFiles to false. A server already caught in the restart loop needs this change before it can start. After upgrading, attachment indexing can be enabled again.

Workarounds as given by stalwartlabs/stalwart's security advisory.

Affected software

SoftwareAffected versions
StalwartServers and applications · github:stalwartlabs/stalwart
  • From 1.0.0 before 1.2.3

About Stalwart

Open-source mail server software with JMAP, IMAP4, POP3, and SMTP support

From Wikidata, CC0 1.0.
Docker Hub pulls
3,987,049Docker Hub, 29 Nov 2026
GitHub stars
16,544GitHub, 29 Nov 2026
Forks
1,108GitHub, 29 Nov 2026
Latest release
v1.2.1GitHub, 29 Nov 2026
Released
26 Nov 2026GitHub
Developer
Stalwart Labs LLCWikidata
Written in
RustWikidata
First released
3 Oct 2021Wikidata
First published on GitHub
6 Mar 2023GitHub

References