GHSA-rcx8-48pc-v9q8
medium
mail-internals use-after-free vulnerability in `vec_insert_bytes`
- Severity
- medium rating by GitHub
- Published
- Last changed
- Also known as
- RUSTSEC-2023-0054
Description
Incorrect reallocation logic in the function vec_insert_bytes causes a use-after-free.
This function does not have to be called directly to trigger the vulnerability because many methods on EncodingWriter call this function internally.
The mail-* suite is unmaintained and the upstream sources have been actively vandalised.
A 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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mail-internals (crates.io) | from 0.2.0 up to 0.2.3, from 0.0.0-0 | GitHub Advisory Database, RustSec Advisory Database |
References
Sources
| Source | Record | Licence |
|---|---|---|
| GitHub Advisory Database | GHSA-rcx8-48pc-v9q8 changed 2023-11-08 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2023-0054 changed 2023-11-08 | CC0-1.0 |