8.1high
rust-openssl: MdCtxRef::digest_final() writes past caller buffer with no length check
- Severity
- 8.1high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.37% (higher than 33% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-ghm9-cr32-g9qjRUSTSEC-2026-0475
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rust-openssl rust-openssl | >= 0.10.39, < 0.10.78 | CVE List |
| openssl (crates.io) | from 0.10.39 before 0.10.78 | GitHub Advisory Database, RustSec Advisory Database |
| rust-openssl_project rust-openssl | from 0.10.39 before 0.10.78 | NVD |
All scores
| GitHub_M | 8.1high CVSS:4.0 | 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 |
| GitHub | high CVSS:4.0 | 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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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.
RustSec Advisory Database
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.
NVD (es)
rust-openssl proporciona enlaces de OpenSSL para el lenguaje de programación Rust. Desde la 0.10.39 hasta antes de la 0.10.78, EVP_DigestFinal() siempre escribe EVP_MD_CTX_size(ctx) en el búfer de salida. Si out es más pequeño que eso, MdCtxRef::digest_final() escribe más allá de su final, corrompiendo habitualmente la pila. Esto es alcanzable desde Rust seguro. Esta vulnerabilidad está corregida en la 0.10.78.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41681 changed 2026-04-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-ghm9-cr32-g9qj changed 2026-11-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2026-0475 changed 2026-11-10 | CC0-1.0 |
| NVD | CVE-2026-41681 changed 2026-11-11 | Public domain |