CVE-2026-41681
Critical · 9.8CVSS
9.8
EPSS
0.4%
Published
Apr 24, 2026
CISA due date
—
Cloudanix analysis
Some Rust applications using affected OpenSSL bindings can be made to crash, and in some cases may be at risk of deeper compromise, until they are rebuilt with the fixed library version.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Library
- Class
- Buffer Overflow
- Remediation
- Upgrade
- Effort
- Low
- Patch risk
- Low
What it actually does
This is a memory corruption vulnerability in the Rust OpenSSL bindings affecting versions 0.10.39 through 0.10.77. The safe Rust API MdCtxRef::digest_final() can call OpenSSL EVP_DigestFinal() in a way that writes EVP_MD_CTX_size(ctx) bytes into the caller-provided output buffer without respecting the actual size of that buffer. If the buffer is smaller than the digest size, memory past the end of the buffer is overwritten, commonly corrupting stack memory. In applications where an attacker can reach a code path that finalizes a digest into an undersized buffer, the result may be process crash, denial of service, or potentially arbitrary code execution depending on compiler protections, platform hardening, memory layout, and how the corrupted memory is used.
Why it matters to the business
Applications built with affected rust-openssl versions may be remotely crashable or, in higher-risk cases, vulnerable to code execution if they expose hashing or cryptographic processing paths reachable by untrusted input. The CVSS score is critical, but current exploitation signals are low: EPSS is 0.00359 and stable over 30 days, there is no known CISA KEV listing, no known ransomware association, and no public exploit maturity reported. Because this is a library flaw, business risk depends heavily on where the crate is embedded; internet-facing Rust services, authentication components, API gateways, file-processing services, and cryptographic validation services should be prioritized for review and patching.
How an attack unfolds
An attacker first identifies a Rust application or service that includes rust-openssl openssl crate versions 0.10.39 through 0.10.77. The attacker then looks for externally reachable functionality that causes the application to compute a message digest using MdCtxRef::digest_final() with an output buffer that may be smaller than the digest length. This may occur in custom cryptographic wrappers, protocol parsers, checksum validation, token handling, file scanning, or request-signature verification code. The attacker sends crafted requests or files that trigger that digest-finalization path. When the vulnerable function writes the digest result, it writes the full digest size past the end of the undersized buffer, corrupting adjacent memory, often the stack. The immediate observable outcome is commonly a crash, abort, segmentation fault, or container restart. In favorable conditions for the attacker, controlled memory corruption could be developed into code execution, though no public exploit or active exploitation is currently known from the provided intelligence.
How to fix it
Upgrade the rust-openssl openssl crate to version 0.10.78 or later. Review Cargo.lock and transitive dependency resolution to ensure no affected version from 0.10.39 through 0.10.77 remains in built artifacts. For direct dependencies, update Cargo.toml to require a safe version, then run cargo update -p openssl --precise 0.10.78 or upgrade to the latest compatible release. Rebuild and redeploy all affected Rust binaries, containers, serverless packages, and statically linked artifacts because the vulnerable code is embedded at build time. If immediate upgrade is not possible, audit code using MdCtxRef::digest_final() and ensure the provided output buffer is always at least EVP_MD_CTX_size(ctx) bytes for the selected digest, or replace custom digest-finalization code with safer high-level APIs. Treat mitigations as temporary; upgrading is the durable fix.
How to confirm the fix worked
Confirm dependency exposure by inspecting Cargo.lock, SBOMs, and build manifests for the openssl crate version. Affected versions are >=0.10.39 and <0.10.78. Useful commands include cargo tree -i openssl, cargo update -p openssl --dry-run, cargo audit, and SBOM queries against deployed images or artifacts. Validate remediation by confirming the resolved openssl crate version is 0.10.78 or later in the final build output, not only in source manifests. Rebuild from a clean dependency cache where practical, redeploy, and verify runtime artifacts were replaced. For code-level validation, search for MdCtxRef::digest_final() usage and confirm any caller-provided output buffer is sized to the digest output length. Regression testing should include digest operations for all supported algorithms and negative tests that previously used short buffers, confirming they no longer corrupt memory or crash the process.
Typical attack path
- Identify software built with the affected rust-openssl openssl crate versions 0.10.39 through 0.10.77.
- Find an exposed feature that performs digest or hashing operations through MdCtxRef::digest_final().
- Determine whether the application can reach that call with an output buffer smaller than the digest size.
- Send crafted network requests, uploaded files, protocol messages, or API inputs that trigger the vulnerable digest-finalization logic.
- Cause an out-of-bounds write that corrupts stack or adjacent memory.
- Observe process crash, service restart, denial of service, or attempt further exploitation if memory corruption can be controlled.
How to detect it
There are no unique network payloads or attacker-specific indicators provided for this vulnerability, and exploitation may look like ordinary application crashes unless additional telemetry is available. To determine whether exploitation may already have occurred, correlate dependency exposure with runtime instability. Review application logs, system journals, container orchestration events, crash dumps, core files, EDR telemetry, and APM traces for crashes in Rust services that include openssl crate versions 0.10.39 through 0.10.77. Look for segmentation faults, stack-smashing detections, aborts, illegal memory access, repeated restarts, or crashes occurring immediately after requests that trigger hashing, signature validation, file upload, checksum, token, or protocol-authentication code. If core dumps are available, inspect stack traces for rust-openssl frames such as MdCtxRef::digest_final or OpenSSL EVP_DigestFinal. For web or API services, correlate crash timestamps with access logs to identify repeated requests from the same source, unusual uploaded files, malformed protocol messages, or high-frequency attempts against endpoints that perform cryptographic digest operations. Absence of these artifacts does not prove non-exploitation because memory corruption may crash without a distinctive log entry.
- MdCtxRef::digest_final
- EVP_DigestFinal
- stack smashing detected
- segmentation fault
- SIGSEGV
- core dumped
- fatal runtime error
- memory corruption
- container restarted
- CrashLoopBackOff
- openssl 0.10.39
- openssl 0.10.40
- openssl 0.10.41
- openssl 0.10.42
- openssl 0.10.43
- openssl 0.10.44
- openssl 0.10.45
- openssl 0.10.46
- openssl 0.10.47
- openssl 0.10.48
- openssl 0.10.49
- openssl 0.10.50
- openssl 0.10.51
- openssl 0.10.52
- openssl 0.10.53
- openssl 0.10.54
- openssl 0.10.55
- openssl 0.10.56
- openssl 0.10.57
- openssl 0.10.58
- openssl 0.10.59
- openssl 0.10.60
- openssl 0.10.61
- openssl 0.10.62
- openssl 0.10.63
- openssl 0.10.64
- openssl 0.10.65
- openssl 0.10.66
- openssl 0.10.67
- openssl 0.10.68
- openssl 0.10.69
- openssl 0.10.70
- openssl 0.10.71
- openssl 0.10.72
- openssl 0.10.73
- openssl 0.10.74
- openssl 0.10.75
- openssl 0.10.76
- openssl 0.10.77
What your security team should do
- Inventory Rust applications, containers, and binaries that include the rust-openssl openssl crate.
- Prioritize internet-facing services, authentication or authorization components, file-processing systems, cryptographic validation services, and high-availability workloads.
- Upgrade all affected builds to openssl crate version 0.10.78 or later and redeploy rebuilt artifacts.
- Search source code for MdCtxRef::digest_final() and review buffer sizing assumptions even after dependency upgrade.
- Use SCA, SBOM, and CI dependency gates to block openssl crate versions >=0.10.39 and <0.10.78.
- Monitor crash, abort, segmentation fault, and container restart telemetry for services that used affected versions, especially around digest or file-processing routes.
- Because EPSS is currently low and there is no KEV or known ransomware use, handle as high-severity patching rather than confirmed active exploitation unless local evidence indicates otherwise.
The record
rust-openssl provides OpenSSL bindings for the Rust programming language. From 0.10.39 to before 0.10.78, EVP_DigestFinal() always writes EVP_MD_CTX_size(ctx) to the out buffer. If out is smaller than that, MdCtxRef::digest_final() writes past its end, usually corrupting the stack. This is reachable from safe Rust. This vulnerability is fixed in 0.10.78.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| crates.io | openssl | 0.10.39 | 0.10.78 |
Related vulnerabilities
- GHSA-ghm9-cr32-g9qj rust-openssl: rustMdCtxRef::digest_final() writes past caller buffer with no length check 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