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 package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| lettre (crates.io) | from 0.7.0 before 0.9.6, from 0.10.0-alpha.1 before 0.10.0-rc.3 | GitHub Advisory Database, RustSec Advisory Database |
| lettre lettre | before 0.9.6, 0.10.0 | NVD |
All scores
| GitHub | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 7.5high CVSS:2.0 | AV: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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-38189 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-qc36-q22q-cjw3 changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2021-0069 changed 2026-11-18 | CC0-1.0 |
| NVD | CVE-2021-38189 changed 2026-06-17 | Public domain |