Servers and applications
GHSA-ggp6-9qpj-58hf
SMTP command injection through CR/LF in a Sieve redirect address
- Severity
- Medium 6.3
- Published
- 3 Dec 2026
- Last changed
- 3 Dec 2026
- Added to UpHeron
- 3 Dec 2026
- Fixed in
- 1.2.3
- Weakness
- CRLF injection (CWE-93)CWE-147
- Attack
- Over the network · Only under certain conditions · Needs a user account · No user action needed
- Attacker can
- Change data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:N- Sources
- Project advisories (GitHub)
Description
The Sieve redirect action kept every character inside a quoted local part, including CR and LF, and then removed the quotes. The resulting address was queued unchanged and written into the outbound RCPT TO:<...> command, so the embedded line breaks became separate SMTP commands on Stalwart's connection to the next hop. Any user allowed to upload a Sieve script (the default role) could therefore add commands such as RSET, NOOP or a second MAIL FROM/RCPT TO/DATA transaction to a delivery. Angle brackets were stripped, so injected MAIL FROM and RCPT TO commands only take effect on a receiving MTA that accepts paths without brackets; against such a server, the user can send a message with an envelope sender of their choice from Stalwart's IP address, bypassing sender address checks, rate limits and queue logging. The notify action's mailto: parser accepted percent-encoded control characters other than CR and LF in the same way.
Workarounds
Until upgrading, remove the Sieve script permissions from untrusted users, or configure the next-hop relay to require angle brackets on envelope paths (for example strict_rfc821_envelopes = yes in Postfix), which limits injected commands to ones without paths.
Affected software
| Software | Affected versions |
|---|---|
StalwartServers and applications · github:stalwartlabs/stalwart |
|
About Stalwart
Open-source mail server software with JMAP, IMAP4, POP3, and SMTP support
- 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
Website Source code Docker image
Vulnerabilities in Stalwart
- In our list
- 9
- Published in the last 12 months
- 5
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- GHSA-7hw7-gq2q-796xUnauthenticated memory exhaustion through inbound DMARC and TLS report analysisHigh 7.5 3 Dec 2026
- GHSA-3v65-6jq9-v3hwUnauthenticated memory exhaustion through PDF attachment text extractionHigh 7.5 3 Dec 2026
- GHSA-hf56-fq2g-v9r2Authenticated memory exhaustion through repeated hrefs in CalDAV/CardDAV multiget reportsMedium 6.5 3 Dec 2026
- CVE-2026-26312Out-of-Memory Denial of Service via Malformed Nested MIME MessagesMedium 6.5 14 Feb 2026
- CVE-2025-61600Unbounded Memory Allocation in Stalwart IMAP serverHigh 7.5 30 Sept 2025
- CVE-2025-59045Memory Exhaustion via CalDAV Event ExpansionHigh 10 Sept 2025
References
- GitHub Advisory Database https://github.com/advisories/GHSA-ggp6-9qpj-58hf
- github.com https://github.com/stalwartlabs/stalwart/security/advisories/GHSA-ggp6-9qpj-58hf