{"id":"CVE-2026-41678","aliases":["CVE-2026-41678","GHSA-8c75-8mhr-p7r9","RUSTSEC-2026-0463"],"related":[],"kind":"vulnerability","state":"published","title":"rust-openssl: Incorrect bounds assertion in aes key wrap","summary":"rust-openssl provides OpenSSL bindings for the Rust programming language.  From  to before 0.10.78, aes::unwrap_key() contains an incorrect assertion: it checks that out.len() + 8 <= in_.len(), but this condition is reversed. The intended invariant is out.len() >= in_.len() - 8, ensuring the output buffer is large enough. Because of the inverted check, the function only accepts buffers at or below the minimum required size and rejects larger ones. If a smaller buffer is provided the function will write past the end of out by in_.len() - 8 - out.len() bytes, causing an out-of-bounds write from a safe public function. 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  to before 0.10.78, aes::unwrap_key() contains an incorrect assertion: it checks that out.len() + 8 <= in_.len(), but this condition is reversed. The intended invariant is out.len() >= in_.len() - 8, ensuring the output buffer is large enough. Because of the inverted check, the function only accepts buffers at or below the minimum required size and rejects larger ones. If a smaller buffer is provided the function will write past the end of out by in_.len() - 8 - out.len() bytes, causing an out-of-bounds write from a safe public function. This vulnerability is fixed in 0.10.78.","source":"cvelist"},{"lang":"en","text":"### Summary\n``aes::unwrap_key()`` has an incorrect bounds assertion on the out buffer size, which can lead to out-of-bounds write.\n\n### Details\n``aes::unwrap_key()`` contains an incorrect assertion: it checks that `out.len() + 8 <= in_.len()`, but this condition is reversed. The intended invariant is `out.len() >= in_.len() - 8`, ensuring the output buffer is large enough.\n\nBecause of the inverted check, the function only accepts buffers at or below the minimum required size and rejects larger ones. If a smaller buffer is provided the function will write past the end of `out` by `in_.len() - 8 - out.len()` bytes, causing an out-of-bounds write from a safe public function.\n\n### Impact\nVulnerable applications using AES keywrap and allowing attacker controlled buffer sizes could have an attacker trigger an out-of-bounds write.","format":"markdown","source":"ghsa"},{"lang":"en","text":"`openssl::aes::unwrap_key` guarded the size of its output buffer with an inverted assertion, `out.len() + 8 <= in_.len()`. Instead of rejecting an `out` buffer too small for the unwrapped key, it rejected buffers larger than needed and accepted buffers that were too small.\n\nWhen `out` is shorter than `in_.len() - 8` bytes, the underlying `AES_unwrap_key` call writes past the end of `out`. This out-of-bounds write is reachable from a safe function; applications that let untrusted input influence the input or output buffer sizes are exposed.\n\nThe function was added in 0.10.24. 0.10.78 corrects the assertion, so an output buffer that is too small now causes a panic before anything is written.","format":"markdown","source":"rustsec"},{"lang":"es","text":"rust-openssl proporciona enlaces OpenSSL para el lenguaje de programación Rust. Desde hasta antes de la versión 0.10.78, aes::unwrap_key() contiene una aserción incorrecta: verifica que out.len() + 8 <= in_.len(), pero esta condición está invertida. El invariante previsto es out.len() >= in_.len() - 8, asegurando que el búfer de salida sea lo suficientemente grande. Debido a la verificación invertida, la función solo acepta búferes iguales o inferiores al tamaño mínimo requerido y rechaza los más grandes. Si se proporciona un búfer más pequeño, la función escribirá más allá del final de out en in_.len() - 8 - out.len() bytes, causando una escritura fuera de límites desde una función pública segura. Esta vulnerabilidad se corrige en la versión 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:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/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:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"version":">= 0.10.24, < 0.10.78","status":"affected"}],"vendor":"rust-openssl","product":"rust-openssl","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.10.24","status":"affected","fixed":"0.10.78"}],"ecosystem":"crates.io","package":"openssl","purl":"pkg:cargo/openssl","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.10.24","status":"affected","fixed":"0.10.78"}],"ecosystem":"crates.io","package":"openssl","purl":"pkg:cargo/openssl","source":"rustsec"},{"ranges":[{"status":"affected","introduced":"0.10.24","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-8c75-8mhr-p7r9","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41678","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rust-openssl/rust-openssl/pull/2604","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/rust-openssl/rust-openssl/commit/718d07ff8ff7be417d5b7a6a0047f1607520b3b6","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rust-openssl/rust-openssl","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78","tags":["web"],"sources":["ghsa"]},{"url":"https://crates.io/crates/openssl","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0463.html","tags":["advisory"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-04-24T18:27:46.176Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41678","url":"https://www.cve.org/CVERecord?id=CVE-2026-41678","licence":"CVE Terms of Use","modified":"2026-04-24T18:33:14.697Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8c75-8mhr-p7r9","url":"https://github.com/advisories/GHSA-8c75-8mhr-p7r9","licence":"CC-BY-4.0","modified":"2026-11-09T16:26:14.394Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0463","url":"https://rustsec.org/advisories/RUSTSEC-2026-0463.html","licence":"CC0-1.0","modified":"2026-11-09T16:15:02.466Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41678","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41678","licence":"Public domain","modified":"2026-11-11T23:10:00.263Z"}],"updatedAt":"2026-11-25T22:59:19.552Z","epss":{"score":0.00261,"percentile":0.19058,"date":"2026-12-01T12:00:22.000Z"}}