CVE-2021-38189
JSON

9.8critical

SMTP command injection in lettre

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
1.49% (higher than 74% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-qc36-q22q-cjw3RUSTSEC-2021-0069

Description

An issue was discovered in the lettre crate before 0.9.6 for Rust. In an e-mail message body, an attacker can place a . character after two <CR><LF> sequences and then inject arbitrary SMTP commands.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
lettre (crates.io)from 0.7.0 before 0.9.6, from 0.10.0-alpha.1 before 0.10.0-rc.3GitHub Advisory Database, RustSec Advisory Database
lettre lettrebefore 0.9.6, 0.10.0NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

An issue was discovered in the lettre crate before 0.9.6 for Rust. In an e-mail message body, an attacker can place a . character after two <CR><LF> sequences and then inject arbitrary SMTP commands.

GitHub Advisory Database
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
RustSec Advisory Database

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.

The flaw is fixed by correctly handling consecutive CRLF sequences.

NVD (es)

Se ha detectado un problema en la crate lettre versiones anteriores a 0.9.6 para Rust. En el cuerpo de un mensaje de correo electrónico, un atacante puede colocar un carácter . después de dos secuencias (CR)(LF) y luego inyectar comandos SMTP arbitrario

References

Related

Sources

SourceRecordLicence
CVE ListCVE-2021-38189 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-qc36-q22q-cjw3 changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0069 changed 2026-11-18CC0-1.0
NVDCVE-2021-38189 changed 2026-06-17Public domain