# CVE-2026-41898: rust-openssl: Unchecked callback-returned length in PSK and cookie generate trampolines can cause OpenSSL to leak adjacent memory to the network peer

- Severity: High 8.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 23% of CVEs (2026-12-01)
- Published: 2026-04-19T12:00:00.000Z
- Modified: 2026-11-11T23:10:00.263Z
- Also known as: GHSA-hppc-g8h3-xhp3, RUSTSEC-2026-0478
- Weaknesses: CWE-126, CWE-130
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

rust-openssl provides OpenSSL bindings for the Rust programming language.  From 0.9.24 to before 0.10.78, the FFI trampolines behind SslContextBuilder::set_psk_client_callback, set_psk_server_callback, set_cookie_generate_cb, and set_stateless_cookie_generate_cb forwarded the user closure's returned usize directly to OpenSSL without checking it against the &mut [u8] that was handed to the closure. This can lead to buffer overflows and other unintended consequences. This vulnerability is fixed in 0.10.78.

(As written by CVE List.)

## Affected

- rust-openssl rust-openssl: >= 0.9.24, < 0.10.78
- openssl (crates.io): from 0.9.24 before 0.10.78
- rust-openssl_project rust-openssl: from 0.9.24 before 0.10.78

## Every score

- GitHub_M: CVSS:4.0 8.3 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:L/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`

## References

- <https://github.com/rust-openssl/rust-openssl/security/advisories/GHSA-hppc-g8h3-xhp3> (vendor-advisory, web)
- <https://github.com/rust-openssl/rust-openssl/pull/2607> (issue-tracking, web)
- <https://github.com/rust-openssl/rust-openssl/commit/1d109020d98fff2fb2e45c39a373af3dff99b24c> (patch, web)
- <https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-41898> (advisory)
- <https://github.com/rust-openssl/rust-openssl> (package)
- <https://crates.io/crates/openssl> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0478.html> (advisory)

## Sources

- CVE List: [CVE-2026-41898](https://www.cve.org/CVERecord?id=CVE-2026-41898), CVE Terms of Use, modified 2026-04-24
- GitHub Advisory Database: [GHSA-hppc-g8h3-xhp3](https://github.com/advisories/GHSA-hppc-g8h3-xhp3), CC-BY-4.0, modified 2026-11-10
- RustSec Advisory Database: [RUSTSEC-2026-0478](https://rustsec.org/advisories/RUSTSEC-2026-0478.html), CC0-1.0, modified 2026-11-10
- NVD: [CVE-2026-41898](https://nvd.nist.gov/vuln/detail/CVE-2026-41898), Public domain, modified 2026-11-11

---

Page: https://cve.day/CVE-2026-41898 · Whole record: https://cve.day/CVE-2026-41898.json · Rebuilt by cve.day 2026-11-25T22:59:19.554Z
