CVE-2020-28247: Lettre Argument Injection Vulnerability
MODERATECVE-2020-28247 is a MODERATE (CVSS 5.3) argument injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Lettre libraries in the crates.io ecosystem. The issue involves argument injection in lettre. Remediation is available by upgrading affected packages to version 0.9.5, 0.8.4, 0.7.1.
CVE-2020-28247 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2020-28247
To remediate this vulnerability, upgrade all affected Lettre dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade lettre to 0.9.5
Upgrade lettre to 0.8.4
Upgrade lettre to 0.7.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for lettre
How to Check if You Are Affected
To determine whether your application is affected by CVE-2020-28247, inspect your project dependencies for Lettre:
inspect dependencies for lettre
Analyze the terminal output to locate any version of Lettre in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.9.5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Lettre, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2020-28247 Affected Lettre Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
lettre
|
crates.io |
≥ 0.9.0
< 0.9.5
|
0.9.5
|
|
lettre
|
crates.io |
≥ 0.8.0
< 0.8.4
|
0.8.4
|
|
lettre
|
crates.io |
≥ 0.7.0
< 0.7.1
|
0.7.1
|
References
Frequently Asked Questions
What is CVE-2020-28247?
Which Lettre versions are affected?
What version fixes CVE-2020-28247?
Is lettre affected?
What is the CVSS score of CVE-2020-28247?
What CWE is associated with CVE-2020-28247?
How can I check crates.io dependencies for CVE-2020-28247?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vc2p-r46x-m3vx",
"modified" : "2021-08-18T20:59:57Z",
"published" : "2021-08-25T20:56:48Z",
"aliases" : [ "CVE-2020-28247" ],
"summary" : "Argument injection in lettre",
"details" : "### Impact\n\nAffected versions of lettre allowed argument injection to the sendmail command. It was possible, using forged to addresses, to pass arbitrary arguments to the sendmail executable.\n\nDepending on the implementation (original sendmail, postfix, exim, etc.) it could be possible in some cases to write email data into abritrary files (using sendmail's logging features).\n\n*NOTE*: This vulnerability only affects the sendmail transport. Others, including smtp, are not affected.\n\n### Fix\n\nThe flaw is corrected by modifying the executed command to stop parsing arguments before passing the destination addresses.\n\n### References\n\n* [RUSTSEC-2020-0069](https://rustsec.org/advisories/RUSTSEC-2020-0069.html)\n* [CVE-2020-28247](https://nvd.nist.gov/vuln/detail/CVE-2020-28247)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "lettre"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.9.0"
}, {
"fixed" : "0.9.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "lettre"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.8.0"
}, {
"fixed" : "0.8.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "lettre"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.7.0"
}, {
"fixed" : "0.7.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/lettre/lettre/security/advisories/GHSA-vc2p-r46x-m3vx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28247"
}, {
"type" : "WEB",
"url" : "https://github.com/RustSec/advisory-db/pull/478/files"
}, {
"type" : "WEB",
"url" : "https://github.com/lettre/lettre/pull/508/commits/bbe7cc5381c5380b54fb8bbb4f77a3725917ff0b"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/lettre/lettre"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2020-0069.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-08-18T20:59:57Z",
"nvd_published_at" : null
}
}