{"id":"GHSA-pqf5-4pqq-29f5","summary":"rust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1","details":"`Deriver::derive` (and `PkeyCtxRef::derive`) sets `len = buf.len()` and passes it as the in/out length to `EVP_PKEY_derive`, relying on OpenSSL to honor it. On OpenSSL 1.1.x, X25519, X448, DH and HKDF-extract  ignore the incoming `*keylen`, unconditionally writing the full shared secret (32/56/prime-size bytes). A caller passing a short slice gets a heap/stack overflow from safe code. OpenSSL 3.x providers do check, so this only impacts older OpenSSL.","aliases":["CVE-2026-41676"],"modified":"2026-07-17T21:16:08.319387954Z","published":"2026-04-22T21:22:00Z","database_specific":{"github_reviewed_at":"2026-04-22T21:22:00Z","nvd_published_at":"2026-04-24T18:16:29Z","cwe_ids":["CWE-131","CWE-787"],"severity":"HIGH","github_reviewed":true},"references":[{"type":"WEB","url":"https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-pqf5-4pqq-29f5"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41676"},{"type":"WEB","url":"https://github.com/rust-openssl/rust-openssl/pull/2606"},{"type":"WEB","url":"https://github.com/rust-openssl/rust-openssl/commit/09b425e5f59a2466d806e71a83a9a449c914c596"},{"type":"PACKAGE","url":"https://github.com/rust-openssl/rust-openssl"},{"type":"WEB","url":"https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78"}],"affected":[{"package":{"name":"openssl","ecosystem":"crates.io","purl":"pkg:cargo/openssl"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.9.27"},{"fixed":"0.10.78"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-pqf5-4pqq-29f5/GHSA-pqf5-4pqq-29f5.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"}]}