logo

GHSA-rcx8-48pc-v9q8 mail-internals

Package

Manager: cargo
Name: mail-internals
Vulnerable Version: >=0.2.0 <=0.2.3

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H/E:F/RL:O/RC:C

CVSS v4.0: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

mail-internals use-after-free vulnerability in `vec_insert_bytes` 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. This 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. 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.

Metadata

Created: 2023-08-24T22:20:47Z
Modified: 2023-08-24T22:20:47Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/08/GHSA-rcx8-48pc-v9q8/GHSA-rcx8-48pc-v9q8.json
CWE IDs: []
Alternative ID: N/A
Finding: F111
Auto approve: 1