CVE-2026-41678
HighCVSS 8.1Exploitation Probability (EPSS)
Low risk16th percentile - higher than 16% of all known CVEs
Summary
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.
Risk Assessment
The organization faces potential data integrity breaches or system crashes due to out-of-bounds memory writes, which could lead to unpredictable application behavior or privilege escalation.
Recommendation
Immediately update the rust-openssl library to version 0.10.78 or later, which includes the fix for the incorrect assertion.
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-41898Medium
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.
- 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-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 to before 0.10.78, aes::unwrap_key() contains an incorrect assertion: it checks that out.len() + 8 <= in_.len(), but this condition is reversed. The intended invariant is out.len() >= in_.len() - 8, ensuring the output buffer is large enough. Because of the inverted check, the function only accepts buffers at or below the minimum required size and rejects larger ones. If a smaller buffer is provided the function will write past the end of out by in_.len() - 8 - out.len() bytes, causing an out-of-bounds write from a safe public function. This vulnerability is fixed in 0.10.78.

