# CVE-2026-41676: rust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1

- Severity: High 7.2 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 33% of CVEs (2026-11-30)
- Published: 2026-04-19T12:00:00.000Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-pqf5-4pqq-29f5, RUSTSEC-2026-0473
- Weaknesses: CWE-131, CWE-787
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- rust-openssl rust-openssl: >= 0.9.27, < 0.10.78
- openssl (crates.io): from 0.9.27 before 0.10.78
- rust-openssl_project rust-openssl: from 0.9.27 before 0.10.78

## Every score

- GitHub_M: CVSS:4.0 7.2 High `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`
- GitHub: CVSS:4.0 High `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`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-pqf5-4pqq-29f5> (vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-41676> (advisory)
- <https://github.com/rust-openssl/rust-openssl/pull/2606> (web)
- <https://github.com/rust-openssl/rust-openssl/commit/09b425e5f59a2466d806e71a83a9a449c914c596> (web)
- <https://github.com/rust-openssl/rust-openssl> (package)
- <https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78> (web)
- <https://crates.io/crates/openssl> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0473.html> (advisory)

## Sources

- CVE List: [CVE-2026-41676](https://www.cve.org/CVERecord?id=CVE-2026-41676), CVE Terms of Use, modified 2026-04-24
- GitHub Advisory Database: [GHSA-pqf5-4pqq-29f5](https://github.com/advisories/GHSA-pqf5-4pqq-29f5), CC-BY-4.0, modified 2026-11-10
- RustSec Advisory Database: [RUSTSEC-2026-0473](https://rustsec.org/advisories/RUSTSEC-2026-0473.html), CC0-1.0, modified 2026-11-10
- NVD: [CVE-2026-41676](https://nvd.nist.gov/vuln/detail/CVE-2026-41676), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-41676 · Whole record: https://cve.day/CVE-2026-41676.json · Rebuilt by cve.day 2026-11-25T22:59:19.551Z
