GHSA-rcx8-48pc-v9q8: Mail internals Mail-internals Use-after-free Vulnerability Vulnerability
MODERATEGHSA-rcx8-48pc-v9q8 is a MODERATE mail-internals use-after-free vulnerability vulnerability (General Security Weakness) affecting Mail internals libraries in the crates.io ecosystem. The issue involves mail-internals use-after-free vulnerability in `vec_insert_bytes`. Remediation is available in the latest vendor maintenance releases.
GHSA-rcx8-48pc-v9q8 at a Glance
How to Fix GHSA-rcx8-48pc-v9q8
To remediate this vulnerability, upgrade all affected Mail internals 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 mail-internals to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for mail-internals
How to Check if You Are Affected
To determine whether your application is affected by GHSA-rcx8-48pc-v9q8, inspect your project dependencies for Mail internals:
inspect dependencies for mail-internals
Analyze the terminal output to locate any version of Mail internals in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), 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 General Security Weakness. In Mail internals, 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
GHSA-rcx8-48pc-v9q8 Affected Mail internals Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
mail-internals
|
crates.io |
≥ 0.2.0
≤ 0.2.3
|
|
References
Frequently Asked Questions
What is GHSA-rcx8-48pc-v9q8?
Which Mail internals versions are affected?
What version fixes GHSA-rcx8-48pc-v9q8?
Is mail-internals affected?
What CWE is associated with GHSA-rcx8-48pc-v9q8?
How can I check crates.io dependencies for GHSA-rcx8-48pc-v9q8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rcx8-48pc-v9q8",
"modified" : "2023-08-24T22:20:47Z",
"published" : "2023-08-24T22:20:47Z",
"aliases" : [ ],
"summary" : "mail-internals use-after-free vulnerability in `vec_insert_bytes`",
"details" : "Incorrect reallocation logic in the function [`vec_insert_bytes`](https://docs.rs/mail-internals/0.2.3/mail_internals/utils/fn.vec_insert_bytes.html) causes a use-after-free.\n\nThis function does not have to be called directly to trigger the vulnerability because many methods on [`EncodingWriter`](https://docs.rs/mail-internals/0.2.3/mail_internals/encoder/struct.EncodingWriter.html) call this function internally.\n\nThe mail-\\* suite is unmaintained and the upstream sources have been actively vandalised.\nA fixed `mail-internals-ng` (and `mail-headers-ng` and `mail-core-ng`) crate has been published which fixes this, and a dependency on another unsound crate.\n",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "mail-internals"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.2.0"
}, {
"last_affected" : "0.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rustsec/advisory-db/blob/main/crates/mail-internals/RUSTSEC-2023-0054.md"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2023-0054.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-24T22:20:47Z",
"nvd_published_at" : null
}
}