# CVE-2025-24898: rust openssl ssl::select_next_proto use after free

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/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.68%, higher than 53% of CVEs (2026-12-01)
- Published: 2025-02-02T12:00:00.000Z
- Modified: 2026-10-12T18:00:12.406Z
- Also known as: GHSA-rpmj-rpgj-qmpm, RUSTSEC-2025-0004
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

rust-openssl is a set of OpenSSL bindings for the Rust programming language. In affected versions `ssl::select_next_proto` can return a slice pointing into the `server` argument's buffer but with a lifetime bound to the `client` argument. In situations where the `sever` buffer's lifetime is shorter than the `client` buffer's, this can cause a use after free. This could cause the server to crash or to return arbitrary memory contents to the client. The crate`openssl` version 0.10.70 fixes the signature of `ssl::select_next_proto` to properly constrain the output buffer's lifetime to that of both input buffers. Users are advised to upgrade. In standard usage of `ssl::select_next_proto` in the callback passed to `SslContextBuilder::set_alpn_select_callback`, code is only affected if the `server` buffer is constructed *within* the callback.

(As written by CVE List.)

## Affected

- sfackler rust-openssl: >= 0.10.0, < 0.10.70
- openssl (crates.io): from 0.10.0 before 0.10.70; from 0.0.0-0 before 0.10.70

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N`

## References

- <https://github.com/sfackler/rust-openssl/security/advisories/GHSA-rpmj-rpgj-qmpm> (web)
- <https://github.com/sfackler/rust-openssl/pull/2360> (web)
- <https://crates.io/crates/openssl> (package, web)
- <https://lists.debian.org/debian-lts-announce/2025/02/msg00009.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-24898> (advisory)
- <https://github.com/sfackler/rust-openssl/commit/f014afb230de4d77bc79dea60e7e58c2f47b60f2> (web)
- <https://github.com/sfackler/rust-openssl> (package)
- <https://rustsec.org/advisories/RUSTSEC-2025-0004.html> (advisory, web)

## Sources

- CVE List: [CVE-2025-24898](https://www.cve.org/CVERecord?id=CVE-2025-24898), CVE Terms of Use, modified 2025-02-12
- GitHub Advisory Database: [GHSA-rpmj-rpgj-qmpm](https://github.com/advisories/GHSA-rpmj-rpgj-qmpm), CC-BY-4.0, modified 2026-09-10
- RustSec Advisory Database: [RUSTSEC-2025-0004](https://rustsec.org/advisories/RUSTSEC-2025-0004.html), CC0-1.0, modified 2026-10-12
- NVD: [CVE-2025-24898](https://nvd.nist.gov/vuln/detail/CVE-2025-24898), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-24898 · Whole record: https://cve.day/CVE-2025-24898.json · Rebuilt by cve.day 2026-11-25T22:58:53.753Z
