CVE-2026-41898
Critical · 9.8CVSS
9.8
EPSS
0.3%
Published
Apr 24, 2026
CISA due date
—
Cloudanix analysis
Some Rust-based services may crash or mishandle memory during secure network connections unless they are rebuilt with the corrected OpenSSL binding library.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Moderate
- Impact
- Data Exposure
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Affected versions of the Rust openssl crate, from 0.9.24 through 0.10.77, expose unsafe FFI callback trampolines for TLS/DTLS PSK and cookie generation APIs. The vulnerable callbacks forward a Rust closure's returned usize length directly to OpenSSL without validating that the length is no larger than the mutable byte slice supplied to the closure. If an application uses SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, or set_stateless_cookie_generate_cb and the callback returns an oversized length, OpenSSL may operate on memory beyond the intended buffer. Depending on how the application implements the callback and how the surrounding TLS/DTLS code handles the returned length, this can cause memory corruption, out-of-bounds reads/writes, crashes, or other unintended behavior. The flaw is in the Rust binding layer, not in OpenSSL itself, and exposure depends on whether downstream applications use the affected APIs.
Why it matters to the business
Applications built with vulnerable rust-openssl versions may be exposed to remotely reachable memory-safety failures in TLS or DTLS handling if they use the affected PSK or cookie callback features. The most likely operational impact is service instability or denial of service, but memory corruption in network-facing cryptographic code is high-risk because it can potentially undermine confidentiality or lead to deeper compromise depending on the application design. Although the EPSS score is currently low at 0.0028 and unchanged over 30 days, and the vulnerability is not listed in CISA KEV or known ransomware use, the CVSS severity is critical and remediation should be prioritized for any internet-facing or security-sensitive Rust services using rust-openssl.
How an attack unfolds
An attacker targets a Rust application that is compiled against an affected openssl crate version and exposes TLS or DTLS functionality using one of the vulnerable callback APIs. The attacker initiates a protocol flow that causes the application to invoke a PSK client/server callback or a DTLS cookie/stateless cookie generation callback. If the callback implementation can be made to return a length larger than the provided output buffer—whether through attacker-influenced identity data, cookie material, configuration, or flawed application logic—the rust-openssl FFI trampoline passes that unchecked length to OpenSSL. OpenSSL then trusts the returned length and may read or write beyond the intended buffer boundary. Successful exploitation may produce a crash, memory corruption, or potentially exposure or manipulation of adjacent memory, depending on the specific callback, platform, compiler settings, allocator behavior, and application code.
How to fix it
Upgrade the Rust openssl crate to version 0.10.78 or later. Regenerate dependency lockfiles and rebuild all affected binaries, containers, and packages so the fixed crate is actually linked into deployed artifacts. Because this is a library issue, updating source manifests alone is insufficient unless downstream applications are recompiled and redeployed. Use cargo update -p openssl --precise 0.10.78 where appropriate, or allow dependency resolution to select a newer fixed version. If immediate upgrade is not possible, reduce exposure by disabling or avoiding use of SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb, and audit callback implementations to ensure they never return a value greater than the length of the provided output buffer. Where practical, place affected services behind network controls, rate limiting, and crash restart supervision until patched.
How to confirm the fix worked
Confirm that no deployed Rust artifact uses openssl crate versions 0.9.24 through 0.10.77. Review Cargo.lock, cargo tree, SBOMs, container image manifests, and build outputs for the openssl crate version and verify it is 0.10.78 or later. Run cargo tree -i openssl to identify which packages introduce the dependency. Search application source for calls to SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb to determine whether the vulnerable callback paths are used. After upgrading, rebuild from a clean dependency cache where possible, redeploy, and verify runtime artifacts were refreshed by checking package metadata, SBOMs, image digests, and service versions. Functional testing should include TLS/DTLS handshake paths that exercise PSK or cookie callbacks, with assertions that callback return lengths are bounded by the supplied buffer length.
Typical attack path
- Identify a network-accessible Rust service or product using the openssl crate in the affected version range 0.9.24 through 0.10.77.
- Determine whether the service uses PSK TLS callbacks or DTLS cookie/stateless cookie generation callbacks exposed through SslContextBuilder.
- Initiate TLS or DTLS handshakes that reach the vulnerable callback path.
- Send crafted handshake inputs, identities, or parameters that influence the callback output length or generated data size, where the application permits that influence.
- Trigger the callback to return a usize larger than the provided mutable buffer length.
- Cause OpenSSL to trust the unchecked length, resulting in out-of-bounds memory access, memory corruption, or process termination.
- Repeat or refine inputs to achieve reliable denial of service or, in favorable conditions, attempt further exploitation of corrupted process memory.
How to detect it
There are no public, CVE-specific exploitation indicators, no CISA KEV listing, no known ransomware association, and no named threat actors reported for this issue. Detection should focus on identifying vulnerable deployments and looking for symptoms consistent with attempted memory corruption in TLS/DTLS callback paths. Review dependency inventories, SBOMs, Cargo.lock files, CI build logs, and container image contents for openssl crate versions 0.9.24 through 0.10.77. For possible prior exploitation, examine application logs, system journals, container runtime logs, core dump directories, crash reporters, and EDR telemetry for crashes occurring during TLS or DTLS handshakes, especially around PSK authentication or DTLS cookie generation. Useful artifacts include segmentation faults, SIGABRT/SIGSEGV events, allocator corruption messages, repeated process restarts, abnormal handshake failure spikes, and core dumps from Rust services linked against affected rust-openssl versions. Network logs may show repeated malformed or high-volume TLS/DTLS handshake attempts from the same source shortly before crashes, but packet-level indicators will be application-specific.
What your security team should do
- Inventory Rust applications, services, containers, and vendor products that include the openssl crate, prioritizing internet-facing TLS/DTLS services.
- Patch or rebuild affected applications to use openssl crate 0.10.78 or later, prioritizing systems that use PSK TLS or DTLS cookie/stateless cookie callbacks.
- Search source code for the four affected callback APIs and require code review for any callback that returns a generated length.
- Use SCA, SBOM, and CI dependency policies to fail builds that resolve openssl crate versions from 0.9.24 through 0.10.77.
- Monitor affected services for unexplained TLS/DTLS handshake crashes, segmentation faults, aborts, allocator errors, or abnormal restart loops.
- If patching is delayed, restrict network access to affected services, disable exposed PSK/DTLS functionality where feasible, and apply rate limits to handshake traffic.
- Ask vendors of Rust-based appliances, agents, and network services whether their products include rust-openssl in the affected range and whether they use the vulnerable APIs.
The record
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.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | openssl | 0.9.24 | 0.10.78 |
Related vulnerabilities
- GHSA-hppc-g8h3-xhp3 rust-openssl: Unchecked callback length in PSK/cookie trampolines leaks adjacent memory… Same vulnerability
- GHSA-phqj-4mhp-q6mq rust-openssl: Potential out-of-bounds write in `CipherCtxRef::cipher_update_inplace` for… Also affects openssl
- CVE-2026-45784 rust-openssl: Potential out-of-bounds write in `CipherCtxRef::cipher_update_inplace` for… Also affects openssl
- CVE-2026-44662 rust-openssl provides OpenSSL bindings for the Rust programming language. Also affects openssl
- CVE-2026-42327 rust-openssl provides OpenSSL bindings for the Rust programming language. Also affects openssl
- GHSA-xv59-967r-8726 rust-openssl vulnerable to heap buffer overflow when encrypting with AES… Also affects openssl
- GHSA-xp3w-r5p5-63rr rust-openssl has undefined behavior in X509Ref::ocsp_responders for certificates with… Also affects openssl
- CVE-2026-41676 rust-openssl provides OpenSSL bindings for the Rust programming language. Also affects openssl