Advisory

RUSTSEC-2026-0475

Also known as: CVE-2026-41681, GHSA-ghm9-cr32-g9qj

Summary

Buffer overflow in MdCtxRef::digest_final

Details

MdCtxRef::digest_final passed the caller's output slice to OpenSSL's EVP_DigestFinal without checking its length. EVP_DigestFinal always writes the full digest (EVP_MD_CTX_size bytes), so an output slice shorter than the digest is overrun. With a stack buffer this usually corrupts the stack. The overflow is reachable from safe code.

MdCtxRef was added in 0.10.39. 0.10.78 checks the slice length first and returns an error when the slice is too short for the digest.

Severity

Not rated by the source.

Dates

Published
2026-04-19 12:00 UTC
Modified
2026-11-10 14:00 UTC

Affected packages and fixes

openssl

crates.io · All systems

Affected

  • introduced 0.10.39, fixed 0.10.78 (semver)

Fixed versions

0.10.78

Fix

  • Fixed version 0.10.78
    cargo update -p openssl --precise 0.10.78

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: RustSec Advisory Database · CC0-1.0

Sources & licences