Out-of-bounds read in rust-openssl - #VU126494

 

Out-of-bounds read in rust-openssl - #VU126494

Published: April 20, 2026


Vulnerability identifier: #VU126494
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: N/A
CWE-ID: CWE-125
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: Steven Fackler
Affected software:
rust-openssl

Detailed vulnerability description

The vulnerability allows a remote attacker to disclose sensitive information.

The vulnerability exists due to improper bounds checking in the FFI trampolines for SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb when forwarding callback-returned lengths to OpenSSL. A remote attacker can trigger processing of a callback that returns an excessive length to disclose sensitive information.

The issue stems from passing the user closure's returned usize directly to OpenSSL without checking it against the &mut [u8] buffer provided to the closure.


Remediation

Install security update from vendor's website.

Sources