{"id":"CVE-2026-41676","published":"2026-04-24T17:16:20Z","modified":"2026-04-24T17:43:20Z","title":"rust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1","vendor":"rust-openssl","product":"rust-openssl","tier":"tail","description":{"text":"rust-openssl provides OpenSSL bindings for the Rust programming language.  From 0.9.27 to before 0.10.78, 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. This vulnerability is fixed in 0.10.78.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.2,"severity":"HIGH","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00296,"percentile":0.22596,"provenance":"source"},"cwes":[{"id":"CWE-787","name":"Out-of-bounds Write"},{"id":"CWE-131","name":"Incorrect Calculation of Buffer Size"}],"references":[{"url":"https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-pqf5-4pqq-29f5","tags":["x_refsource_CONFIRM"]}],"priority":{"score":9.6,"factors":[{"name":"EPSS percentile","points":4.52},{"name":"CVSS severity","points":5.04}]},"vendorSlug":"rust-openssl","affectedVersions":[{"vendor":"rust-openssl","product":"rust-openssl","versions":[">= 0.9.27, < 0.10.78"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2026-04-24T17:43:14.622885Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"openssl","vulnerableRanges":[">=0.9.27, <0.10.78"],"patched":["0.10.78"],"from":["GHSA-pqf5-4pqq-29f5","RUSTSEC-2026-0473"],"provenance":"source"}],"summary":{"text":"The rust-openssl crate, in its Deriver::derive and PkeyCtxRef::derive functions, passes the caller's buffer length to OpenSSL's EVP_PKEY_derive while relying on OpenSSL to respect it, which affects builds from 0.9.27 up to but not including 0.10.78 when linked against OpenSSL 1.1.x. An attacker who can get a caller to supply a short output buffer to these functions, through safe code using X25519, X448, DH or HKDF-extract, can trigger a heap or stack overflow, with no authentication required and network access sufficient to reach the affected code path.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:05:56Z"},"euvd":{"id":"EUVD-2026-25582","exploited":false,"provenance":"source"}}