{"id":"CVE-2021-38189","aliases":["EUVD-2021-1485","GHSA-qc36-q22q-cjw3","RUSTSEC-2021-0069"],"status":"published","title":"SMTP command injection in lettre","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 \u003cCR\u003e\u003cLF\u003e sequences and then inject arbitrary SMTP commands.","severity":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01494,"percentile":0.74495,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-147","CWE-77"],"published":"2021-05-22T12:00:00Z","modified":"2026-10-24T10:31:01Z","fixes":[{"ecosystem":"crates.io","package":"lettre","fixed_in":["0.9.6","0.10.0-rc.3"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"crates.io","package":"lettre","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0.7.0"},{"fixed":"0.9.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"lettre","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"0.9.6"}]}]},{"source":"osv","ecosystem":"crates.io","package":"lettre","ranges":[{"type":"SEMVER","events":[{"introduced":"0.7.0"},{"fixed":"0.9.6"},{"introduced":"0.10.0-alpha.1"},{"fixed":"0.10.0-rc.3"}]}]}],"products":[{"vendor":"lettre","product":"lettre"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2021-0069.html","tags":["x_refsource_MISC","x_transferred","Exploit","Issue Tracking","Patch","Third Party Advisory","fix","web","advisory"]},{"url":"https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/lettre/RUSTSEC-2021-0069.md","tags":["x_refsource_MISC","x_transferred","Third Party Advisory","advisory"]},{"url":"https://github.com/lettre/lettre/security/advisories/GHSA-qc36-q22q-cjw3","tags":["web"]},{"url":"https://github.com/lettre/lettre/commit/8bfc20506cc5e098fe6eb3d1cafe3bea791215ce","tags":["web"]},{"url":"https://github.com/lettre/lettre/pull/627/commits/93458d01fed0ec81c0e7b4e98e6f35961356fae2","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qc36-q22q-cjw3"},{"url":"https://github.com/lettre/lettre","tags":["package"]},{"url":"https://crates.io/crates/lettre","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-38189","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 \u003cCR\u003e\u003cLF\u003e sequences and then inject arbitrary SMTP commands.","status":"published","published":"2021-08-08T05:10:12Z","modified":"2024-08-04T01:37:15.947Z","updated_at":"2026-11-02T14:33:07.697752Z"}],"euvd":[{"id":"EUVD-2021-1485","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 \u003cCR\u003e\u003cLF\u003e sequences and then inject arbitrary SMTP commands.","status":"published","published":"2021-08-08T05:10:12Z","modified":"2024-08-04T01:37:15Z","updated_at":"2026-11-03T03:24:25.678078Z"}],"ghsa":[{"id":"GHSA-qc36-q22q-cjw3","title":"SMTP command injection in lettre","description":"### 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)\n\n\n\n","status":"published","published":"2021-07-12T17:03:27Z","modified":"2023-02-03T05:06:03Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-147"],"updated_at":"2026-11-02T14:36:43.439065Z"}],"nvd":[{"id":"CVE-2021-38189","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 \u003cCR\u003e\u003cLF\u003e sequences and then inject arbitrary SMTP commands.","status":"published","published":"2021-08-08T06:15:08.893Z","modified":"2026-06-17T04:01:43.5Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"primary"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","level":"high","assessor":"primary"}],"cwes":["CWE-77"],"updated_at":"2026-11-02T14:06:56.562207Z"}],"osv":[{"id":"CVE-2021-38189","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 \u003cCR\u003e\u003cLF\u003e sequences and then inject arbitrary SMTP commands.","status":"published","published":"2021-08-08T06:15:08.893Z","modified":"2026-10-24T10:31:01.386790123Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"updated_at":"2026-11-02T15:44:20.843843Z"},{"id":"GHSA-qc36-q22q-cjw3","title":"SMTP command injection in lettre","description":"### 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)\n\n\n\n","status":"published","published":"2021-07-12T17:03:27Z","modified":"2023-11-08T04:06:25.79967Z","cvss":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-147"],"updated_at":"2026-11-02T15:46:54.40888Z"},{"id":"RUSTSEC-2021-0069","title":"SMTP command injection in body","description":"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.","status":"published","published":"2021-05-22T12:00:00Z","modified":"2023-11-08T04:06:25.79967Z","updated_at":"2026-11-02T15:53:39.492624Z"}]}}
