Out-of-bounds read in rust-openssl - #VU126494
Published: April 20, 2026
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.