CVE-2026-41676: rust-openssl buffer overflow in Deriver::derive

CVE-2026-41676 · Severity: high · CVSS 7.5 · Published 2026-04-24

rust-openssl is a library that allows Rust applications to use OpenSSL for secure communications and cryptography. A flaw in how it handles certain cryptographic operations when using older versions of OpenSSL (1.1.x) can cause a program to crash or behave unpredictably. This occurs when the library fails to properly limit the amount of data written to memory during key derivation, potentially leading to service instability.

Technologies: openssl (crates.io), Rust-Openssl Project Rust-Openssl. Vendors: crates.io, Rust-Openssl Project.

Quick answers

Is CVE-2026-41676 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-41676 being exploited in the wild.
How severe is CVE-2026-41676?
High severity, with a CVSS score of 7.5, published 24 April 2026.
Which products and versions are affected?
openssl (crates.io) SEMVER:introduced=0.9.27,fixed=0.10.78; Rust-Openssl Project Rust-Openssl >= 0.9.27, < 0.10.78.
Is there a fix for CVE-2026-41676?
Yes. openssl (crates.io): upgrade to 0.10.78 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-41676 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-41676?
Check whether you run openssl (crates.io) or Rust-Openssl Project Rust-Openssl at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • openssl (crates.io): upgrade to 0.10.78 or later
    cargo update -p openssl

Technical details

A buffer overflow vulnerability exists in rust-openssl's Deriver::derive and PkeyCtxRef::derive functions. The root cause is an incorrect assumption that OpenSSL's EVP_PKEY_derive honors the provided buffer length. On OpenSSL 1.1.x, specific algorithms (X25519, X448, DH, and HKDF-extract) ignore the input length and unconditionally write the full shared secret. If a caller provides a buffer smaller than the secret size, an out-of-bounds write occurs on the heap or stack. This issue specifically affects environments using OpenSSL 1.1.x; OpenSSL 3.x providers include the necessary checks. The vulnerability is addressed in version 0.10.78.

Affected products

  • rust-openssl project rust-openssl >= 0.9.27, < 0.10.78

Identifiers

  • CVE-2026-41676
  • GHSA-pqf5-4pqq-29f5
  • RUSTSEC-2026-0473

Timeline

  • 2026-04-19: advisory: GitHub advisory GHSA-pqf5-4pqq-29f5 published
  • 2026-04-24: disclosed: CVE-2026-41676 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.