Advisory

GHSA-rcx8-48pc-v9q8

Also known as: RUSTSEC-2023-0054

Summary

mail-internals use-after-free vulnerability in vec_insert_bytes

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2023-08-24 22:20 UTC
Modified
2023-11-08 04:22 UTC

Affected packages and fixes

mail-internals

crates.io · All systems

Affected

  • introduced 0.2.0, last affected 0.2.3 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences