CVE-2020-28247: Argument Injection in lettre

lettre Updated 02 Oct 2025

Summary

25/08/2021
Yes i
Moderate
5.3

CVE-2020-28247: Argument injection in lettre. Affects lettre across 3 version ranges.

>= 0.7.0, < 0.7.1 >= 0.8.0, < 0.8.4 >= 0.9.0, < 0.9.5

Fixed in 0.7.1, 0.8.4 or 0.9.5, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Lettre is a crate for sending emails in Rust. It provides various transport methods, including sendmail. The affected versions of lettre allowed argument injection to the sendmail command, which could lead to arbitrary arguments being passed to the sendmail executable. This could potentially allow an attacker to write email data into arbitrary files, depending on the implementation of sendmail. It's important to note that this vulnerability only affects the sendmail transport, while other transports like smtp are not affected.

Vulnerability Detail

The argument injection vulnerability in lettre allowed attackers to forge email addresses and pass arbitrary arguments to the sendmail executable. This could potentially lead to writing email data into arbitrary files using sendmail's logging features. The impact of this vulnerability depends on the specific implementation of sendmail, postfix, exim, etc. The flaw was fixed by modifying the executed command to stop parsing arguments before passing the destination addresses.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.7.0, < 0.7.1 0.7.1
  • >= 0.8.0, < 0.8.4 0.8.4
  • >= 0.9.0, < 0.9.5 0.9.5

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

The argument injection vulnerability in lettre allowed attackers to pass arbitrary arguments to the sendmail executable, potentially leading to writing email data into arbitrary files. It is recommended to update the lettre package to version 0.9.5 or higher to fix this vulnerability. Regularly checking for updates and applying them is crucial for maintaining the security of the application.

See every vulnerability recorded for lettre →

Share this vulnerability

FAQ

Versions 0.7.0 to 0.7.1, 0.8.0 to 0.8.4, and 0.9.0 to 0.9.4 of lettre are affected by this vulnerability.

Yes, this vulnerability can be exploited remotely if the affected application is exposed to untrusted input.

There are no known instances of this vulnerability being exploited in the wild at the time of this report.

Yes, the CVSS score for this vulnerability is 5.3 (Medium).

You can find more information about this vulnerability in the RUSTSEC advisory RUSTSEC-2020-0069 and the CVE entry CVE-2020-28247.

Related vulnerabilities

Recent vulnerabilities recorded for lettre.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 0.7.0, < 0.7.1 0.7.1
  • >= 0.8.0, < 0.8.4 0.8.4
  • >= 0.9.0, < 0.9.5 0.9.5

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback