{"id":"CVE-2026-41681","aliases":["CVE-2026-41681","GHSA-ghm9-cr32-g9qj","RUSTSEC-2026-0475"],"related":[],"kind":"vulnerability","state":"published","title":"rust-openssl: MdCtxRef::digest_final() writes past caller buffer with no length check","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"`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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"`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.\n\n`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.","format":"markdown","source":"rustsec"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-04-19T12:00:00.000Z","modified":"2026-11-11T23:10:00.263Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-121"],"affected":[{"ranges":[{"version":">= 0.10.39, < 0.10.78","status":"affected"}],"vendor":"rust-openssl","product":"rust-openssl","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.10.39","status":"affected","fixed":"0.10.78"}],"ecosystem":"crates.io","package":"openssl","purl":"pkg:cargo/openssl","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.10.39","status":"affected","fixed":"0.10.78"}],"ecosystem":"crates.io","package":"openssl","purl":"pkg:cargo/openssl","source":"rustsec"},{"ranges":[{"status":"affected","introduced":"0.10.39","fixed":"0.10.78"}],"vendor":"rust-openssl_project","product":"rust-openssl","cpe":"cpe:2.3:a:rust-openssl_project:rust-openssl:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-ghm9-cr32-g9qj","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rust-openssl/rust-openssl/pull/2608","tags":["issue-tracking","web","x-refsource-misc"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://github.com/rust-openssl/rust-openssl/commit/826c3888b77add418b394770e2b2e3a72d9f92fe","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41681","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rust-openssl/rust-openssl","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/openssl","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0475.html","tags":["advisory"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-04-24T17:42:49.447Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41681","url":"https://www.cve.org/CVERecord?id=CVE-2026-41681","licence":"CVE Terms of Use","modified":"2026-04-24T17:42:54.765Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ghm9-cr32-g9qj","url":"https://github.com/advisories/GHSA-ghm9-cr32-g9qj","licence":"CC-BY-4.0","modified":"2026-11-10T14:10:39.444Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0475","url":"https://rustsec.org/advisories/RUSTSEC-2026-0475.html","licence":"CC0-1.0","modified":"2026-11-10T14:00:02.487Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41681","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41681","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.553Z","epss":{"score":0.00373,"percentile":0.33339,"date":"2026-12-01T12:00:22.000Z"}}