CVE-2026-41898: rust-openssl: Unchecked callback-returned length in PSK and cookie generate trampolines can cause OpenSSL to leak adjacent memory to the network peer

Published Apr 22, 2026
·
Updated

rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.24 to before 0.10.78, the FFI trampolines behind SslContextBuilder::setpskclientcallback, setpskservercallback, setcookiegeneratecb, and setstatelesscookiegeneratecb forwarded the user closure's returned usize directly to OpenSSL without checking it against the &mut [u8] that was handed to the closure. This can lead to buffer overflows and other unintended consequences. This vulnerability is fixed in 0.10.78.

Other sources

The FFI trampolines behind SslContextBuilder::setpskclientcallback, setpskservercallback, setcookiegeneratecb, and setstatelesscookiegeneratecb forwarded the user closure's returned usize directly to OpenSSL without checking it against the &mut [u8] that was handed to the closure. This can lead to buffer overflows and other unintended consequences.

GitHub

Affected Software

3 affected componentsFixes available
crates/rust-openssl>=0.9.24<0.10.78
rust/openssl>=0.9.24<0.10.78
0.10.78
Rust-openssl Project Rust-openssl Rust>=0.9.24<0.10.78

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade rust/openssl to a version that resolves this vulnerability.

    Fixed in 0.10.78
  2. Upgrade

    Upgrade rust-openssl to a version that resolves this vulnerability.

    Fixed in 0.10.78

Event History

Apr 22, 2026
Advisory Published
via GitHub·09:00 PM
Data Sourced
via GitHub·09:00 PM
DescriptionWeaknessAffected Software
Apr 24, 2026
CVE Published
via MITRE·05:20 PM
Data Sourced
via MITRE·05:20 PM
DescriptionWeakness
Data Sourced
via NVD·06:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-41898?

CVE-2026-41898 is considered a medium severity vulnerability due to its potential to leak adjacent memory to a network peer.

2

How do I fix CVE-2026-41898?

To fix CVE-2026-41898, you should upgrade rust-openssl to version 0.10.78 or later.

3

What software is affected by CVE-2026-41898?

CVE-2026-41898 affects rust-openssl versions from 0.9.24 to before 0.10.78.

4

What type of vulnerability is CVE-2026-41898?

CVE-2026-41898 is an information disclosure vulnerability caused by unchecked callback-returned lengths.

5

Can CVE-2026-41898 be exploited remotely?

Yes, CVE-2026-41898 can be potentially exploited remotely since it involves leaking memory to a network peer.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203