{"id":"GHSA-rcx8-48pc-v9q8","aliases":["GHSA-rcx8-48pc-v9q8","RUSTSEC-2023-0054"],"related":[],"kind":"vulnerability","state":"published","title":"mail-internals use-after-free vulnerability in `vec_insert_bytes`","summary":"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.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"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.","format":"markdown","source":"ghsa"}],"published":"2023-08-07T12:00:00.000Z","modified":"2023-11-08T04:22:42.487Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.2.0","status":"affected","lastAffected":"0.2.3"}],"ecosystem":"crates.io","package":"mail-internals","purl":"pkg:cargo/mail-internals","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"mail-internals","purl":"pkg:cargo/mail-internals","source":"rustsec"}],"references":[{"url":"https://github.com/rustsec/advisory-db/blob/main/crates/mail-internals/RUSTSEC-2023-0054.md","tags":["web"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0054.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/mail-internals","tags":["package"],"sources":["rustsec"]},{"url":"https://git.sr.ht/~nabijaczleweli/mail-internals.crate/commit/05443c864b204e7f1512caf2d53e8cce4dd340fc","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rcx8-48pc-v9q8","url":"https://github.com/advisories/GHSA-rcx8-48pc-v9q8","licence":"CC-BY-4.0","modified":"2023-11-08T04:22:42.487Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2023-0054","url":"https://rustsec.org/advisories/RUSTSEC-2023-0054.html","licence":"CC0-1.0","modified":"2023-11-08T04:22:42.487Z"}],"updatedAt":"2026-11-25T22:56:43.153Z"}