Skip to content

SMTP command injection in lettre

Critical severity GitHub Reviewed Published May 22, 2021 in lettre/lettre • Updated Feb 3, 2023

Package

cargo lettre (Rust)

Affected versions

>= 0.7.0, < 0.9.6

Patched versions

0.9.6

Description

Impact

Affected versions of lettre allowed SMTP command injection through an attacker's controlled message body. The module for escaping lines starting with a period wouldn't catch a period that was placed after a double CRLF sequence, allowing the attacker to end the current message and write arbitrary SMTP commands after it.

Fix

The flaw is fixed by correctly handling consecutive CRLF sequences.

References

References

@amousset amousset published to lettre/lettre May 22, 2021
Reviewed Jun 1, 2021
Published to the GitHub Advisory Database Jul 12, 2021
Published by the National Vulnerability Database Aug 8, 2021
Last updated Feb 3, 2023

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2021-38189

GHSA ID

GHSA-qc36-q22q-cjw3

Source code

Credits

Checking history
See something to contribute? Suggest improvements for this vulnerability.