CVE-2026-41898: rust-openssl buffer over-read in PSK and cookie callbacks

CVE-2026-41898 · Severity: high · CVSS 5.3 · Published 2026-04-24

rust-openssl is a library that allows Rust applications to use OpenSSL for secure communications. A flaw in how the library handles security callbacks could allow a remote attacker to trigger a memory leak, potentially exposing sensitive data from the application's memory to the network. This affects applications using specific features like Pre-Shared Keys (PSK) or stateless cookies.

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

Quick answers

Is CVE-2026-41898 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-41898 being exploited in the wild.
How severe is CVE-2026-41898?
High severity, with a CVSS score of 5.3, published 24 April 2026.
Which products and versions are affected?
openssl (crates.io) SEMVER:introduced=0.9.24,fixed=0.10.78.
Is there a fix for CVE-2026-41898?
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-41898 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-41898?
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 over-read vulnerability exists in rust-openssl's FFI trampolines for SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb. The library forwarded the usize length returned by user-provided closures directly to OpenSSL without verifying it against the actual size of the destination buffer (&mut [u8]). An attacker interacting with a service using these callbacks could cause OpenSSL to read past the intended buffer, leaking adjacent memory into TLS handshake messages like HelloVerifyRequest or PSK exchanges. The issue is fixed in version 0.10.78 by clamping the returned length to the buffer capacity.

Affected products

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

Identifiers

  • CVE-2026-41898
  • GHSA-hppc-g8h3-xhp3
  • RUSTSEC-2026-0478

Timeline

  • 2026-04-19: patched: Fix committed and version 0.10.78 released.
  • 2026-04-24: advisory: Security advisory published.

References

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