CVE-2026-41898
MediumCVSS 5.3Exploitation Probability (EPSS)
Low risk33th percentile - higher than 33% of all known CVEs
Summary
A vulnerability in the rust-openssl library (versions 0.9.24 through 0.10.78) causes the PSK and cookie callbacks to not validate the user closure's return value against the buffer size. This can lead to buffer overflows and other unintended consequences.
Risk Assessment
An attacker could exploit this vulnerability to cause a buffer overflow, potentially leading to data integrity compromise, application crashes, or remote code execution.
Recommendation
Immediately update the rust-openssl library to version 0.10.78 or later, which contains the fix for this vulnerability.
Other vulnerabilities in rust-openssl
See all- CVE-2026-42327High
In the rust-openssl library, versions from 0.9.7 to before 0.10.79, there is a vulnerability related to improper processing of OCSP responder URLs from a certificate's AIA extension. The use of invalid bytes in the OCSP accessLocation can lead to a violation of the UTF-8 invariant, resulting in undefined behavior.
- CVE-2026-45784High
Vulnerability in rust-openssl from 0.10.50 to 0.10.80. The `CipherCtxRef::cipher_update_inplace` function incorrectly sizes output buffers for AES key-wrap-with-padding ciphers (`EVP_aes_{128,192,256}_wrap_pad`), causing up to 7 bytes of out-of-bounds write and heap corruption when input length is not a multiple of 8.
- CVE-2026-41681High
In the rust-openssl library versions 0.10.39 through 0.10.77, there is a buffer overflow vulnerability in the EVP_DigestFinal() function. This function always writes EVP_MD_CTX_size(ctx) bytes to the output buffer, which when the buffer is smaller leads to a write past its end and potential stack corruption. The issue is reachable from safe Rust code.
- CVE-2026-41678High
In the rust-openssl library before version 0.10.78, the aes::unwrap_key() function contains an incorrect assertion: it checks out.len() + 8 <= in_.len() instead of the correct out.len() >= in_.len() - 8. This leads to an out-of-bounds write when a smaller output buffer is provided.
- CVE-2026-41676High
In rust-openssl versions 0.9.27 through 0.10.77, a heap/stack overflow vulnerability exists in Deriver::derive and PkeyCtxRef::derive functions. On OpenSSL 1.1.x, EVP_PKEY_derive ignores the provided buffer size and writes the full shared secret, causing overflow even from safe Rust code.
Original NVD description (English source)
rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.9.24 to before 0.10.78, the FFI trampolines behind SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb 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.

