CVE-2026-41676 rust-openssl: Deriver::derive and PkeyCtxRef::derive can overflow short buffers on OpenSSL 1.1.1
Attackers can trigger heap or stack overflows via buffer mismanagement in key derivation, potentially leading to code execution or crashes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-41676?
CVE-2026-41676 is a high-severity memory corruption vulnerability in rust-openssl, published on 24 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Which versions are affected by CVE-2026-41676?
2 open source packages ship an affected version, including openssl. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
openssl crates.io | From 0.9.27 | 0.10.78 |
openssl crates.io | From 0.9.27 | 0.10.78 |
Linux distribution packages (10)
s390-tools SUSE:Linux Enterprise Micro 5.3 | All versions | 2.31.0-150400.7.34.1 |
s390-tools SUSE:Linux Enterprise Micro 5.4 | All versions | 2.31.0-150400.7.34.1 |
s390-tools SUSE:Linux Enterprise Micro 5.5 | All versions | 2.31.0-150500.9.32.1 |
cryptsetup SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 2.8.4-150700.6.4.4 |
s390-tools SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 2.41.0-150700.4.26.2 |
s390-tools SUSE:Linux Micro 6.0 | All versions | 2.31.0-4.1 |
s390-tools SUSE:Linux Micro 6.1 | All versions | 2.31.0-slfo.1.1_4.1 |
rustup openSUSE:Tumbleweed | All versions | 1.28.2~0-4.1 |
sccache openSUSE:Tumbleweed | All versions | 0.16.0~0-2.1 |
sdbootutil openSUSE:Tumbleweed | All versions | 1+git20260706.f9f4faf-1.1 |
Products include Rust-Openssl Project Rust-Openssl.
How do I fix CVE-2026-41676?
Upgrade openssl to 0.10.78 or later.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2026-41676 being exploited?
There is no known exploitation of CVE-2026-41676 in the wild and no public exploit code.
Other vulnerabilities in rust-openssl
- CVE-2018-20997 Use after free in openssl
- CVE-2026-41898 rust-openssl: Unchecked callback length in PSK/cookie trampolines leaks adjacent memory to peer
- CVE-2026-41681 rust-openssl: MdCtxRef::digest_final() writes past caller buffer with no length check
- CVE-2016-10931 Improper Certificate Validation in openssl
- CVE-2026-41678 rust-openssl: Incorrect bounds assertion in aes key wrap
Sources
Also known as AZL-83618, DEBIAN-CVE-2026-41676, GHSA-pqf5-4pqq-29f5, MINI-5j43-74cc-qv3m, MINI-7jfp-pm77-w73v, MINI-933m-gpf6-qpwc and 14 more.