rust-openssl: MdCtxRef::digest_final() writes past caller buffer with no length check
cve-program · CVE-2026-41681
Publishedrust-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.
Read the publisher's advisoryeuvd · EUVD-2026-25586
Publishedrust-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.
Read the publisher's advisorynvd · CVE-2026-41681
Publishedrust-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.
Read the publisher's advisoryosv · GHSA-ghm9-cr32-g9qj
Published`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.
Read the publisher's advisoryosv · RUSTSEC-2026-0475
Published`MdCtxRef::digest_final` passed the caller's output slice to OpenSSL's `EVP_DigestFinal` without checking its length. `EVP_DigestFinal` always writes the full digest (`EVP_MD_CTX_size` bytes), so an output slice shorter than the digest is overrun. With a stack buffer this usually corrupts the stack. The overflow is reachable from safe code. `MdCtxRef` was added in 0.10.39. 0.10.78 checks the slice length first and returns an error when the slice is too short for the digest.
Read the publisher's advisoryAffected versions, risk and source history
Related advisories and sources
Publishers link these advisories through the identifiers shown below. A shared identifier or date alone does not tell you whether your software is affected or whether the advisories describe the same cause.
CVE-2026-41681 · CVE overview and exploitation status
cve-program · CVE-2026-41681
- https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-ghm9-cr32-g9qj
- https://github.com/rust-openssl/rust-openssl/pull/2608
- https://github.com/rust-openssl/rust-openssl/commit/826c3888b77add418b394770e2b2e3a72d9f92fe
- https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78
euvd · EUVD-2026-25586
- https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-ghm9-cr32-g9qj
- https://github.com/rust-openssl/rust-openssl/pull/2608
- https://github.com/rust-openssl/rust-openssl/commit/826c3888b77add418b394770e2b2e3a72d9f92fe
- https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78
nvd · CVE-2026-41681
- https://github.com/rust-openssl/rust-openssl/commit/826c3888b77add418b394770e2b2e3a72d9f92fe
- https://github.com/rust-openssl/rust-openssl/pull/2608
- https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78
- https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-ghm9-cr32-g9qj
osv · GHSA-ghm9-cr32-g9qj
- https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-ghm9-cr32-g9qj
- https://nvd.nist.gov/vuln/detail/CVE-2026-41681
- https://github.com/rust-openssl/rust-openssl/pull/2608
- https://github.com/rust-openssl/rust-openssl/commit/826c3888b77add418b394770e2b2e3a72d9f92fe
- https://github.com/rust-openssl/rust-openssl
- https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78
osv · RUSTSEC-2026-0475
Related changes
Linked by CVE identifier- 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 … · Advisory content revised · 16 Nov 2026
- Buffer overflow in `MdCtxRef::digest_final` · Newly collected advisory · 10 Nov 2026
- rust-openssl: rustMdCtxRef::digest_final() writes past caller buffer with no length check · Advisory content revised · 10 Nov 2026