{"id":"CVE-2021-38189","aliases":["CVE-2021-38189","GHSA-qc36-q22q-cjw3","RUSTSEC-2021-0069"],"related":["RUSTSEC-2026-0561"],"kind":"vulnerability","state":"published","title":"SMTP command injection in lettre","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nAffected 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.\n\n### Fix\n\nThe flaw is fixed by correctly handling consecutive CRLF sequences.\n\n### References\n\n* [RUSTSEC-2021-0069](https://rustsec.org/advisories/RUSTSEC-2021-0069.html)","format":"markdown","source":"ghsa"},{"lang":"en","text":"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.\n\nThe flaw is fixed by correctly handling consecutive CRLF sequences.","format":"markdown","source":"rustsec"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-05-22T12:00:00.000Z","modified":"2026-11-18T09:27:05.722Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","score":7.5,"rating":"HIGH"}],"cwes":["CWE-77","CWE-147"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.7.0","status":"affected","fixed":"0.9.6"}],"ecosystem":"crates.io","package":"lettre","purl":"pkg:cargo/lettre","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.7.0","status":"affected","fixed":"0.9.6"},{"type":"semver","introduced":"0.10.0-alpha.1","status":"affected","fixed":"0.10.0-rc.3"}],"ecosystem":"crates.io","package":"lettre","purl":"pkg:cargo/lettre","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.9.6"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"},{"status":"affected","version":"0.10.0"}],"vendor":"lettre","product":"lettre","cpe":"cpe:2.3:a:lettre:lettre:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0069.html","tags":["advisory","exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/lettre/RUSTSEC-2021-0069.md","tags":["third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/lettre/lettre/security/advisories/GHSA-qc36-q22q-cjw3","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/lettre/lettre/pull/627/commits/93458d01fed0ec81c0e7b4e98e6f35961356fae2","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/lettre/lettre/commit/8bfc20506cc5e098fe6eb3d1cafe3bea791215ce","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/lettre/lettre","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/lettre","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-38189","url":"https://www.cve.org/CVERecord?id=CVE-2021-38189","licence":"CVE Terms of Use","modified":"2024-08-04T01:37:15.947Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qc36-q22q-cjw3","url":"https://github.com/advisories/GHSA-qc36-q22q-cjw3","licence":"CC-BY-4.0","modified":"2023-11-08T04:06:25.799Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2021-0069","url":"https://rustsec.org/advisories/RUSTSEC-2021-0069.html","licence":"CC0-1.0","modified":"2026-11-18T09:27:05.722Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-38189","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-38189","licence":"Public domain","modified":"2026-06-17T04:01:43.500Z"}],"updatedAt":"2026-11-25T22:58:03.054Z","epss":{"score":0.01494,"percentile":0.74908,"date":"2026-12-01T12:00:22.000Z"}}