All vulnerabilities

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.

From stalwartlabs/stalwart's security advisory.

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.

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

Affected software

SoftwareAffected versions
StalwartServers and applications · github:stalwartlabs/stalwart
  • Every version 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