Advisory

RUSTSEC-2026-0473

Also known as: CVE-2026-41676, GHSA-pqf5-4pqq-29f5

Summary

Buffer overflow in Deriver::derive and PkeyCtxRef::derive with OpenSSL 1.1.x

Details

Deriver::derive and PkeyCtxRef::derive pass the length of the caller's buffer to EVP_PKEY_derive and rely on OpenSSL to write no more than that. With OpenSSL 1.1.x, the X25519, X448 and HKDF-extract implementations ignore the length they are given and always write the whole result, so a buffer shorter than the shared secret or derived key is overrun. The overflow is reachable from safe code.

OpenSSL 3.x checks the length itself and is not affected. From 0.10.78, when built against OpenSSL 1.1.x or LibreSSL, both functions derive into a temporary buffer of the required size whenever the caller's buffer is too short, and copy only what fits.

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.9.27, 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