RUSTSEC-2026-0413 Use-after-free of caller-owned server name in client connection constructors
- Exploited in the wild
- Not known
- Fix
- Available
What is RUSTSEC-2026-0413?
RUSTSEC-2026-0413 is a vulnerability in rustls-ffi, published on 26 Oct 2026.
Official description
In rustls-ffi 0.12.0 through 0.15.6, rustls_client_connection_new() and
rustls_client_connection_new_alpn() retained a reference to the caller's
server_name buffer after returning, rather than copying it. The API
documentation did not require the buffer to outlive the call and as a result
if the caller freed or reused the buffer, later TLS processing read freed
memory.
Clients that free or reuse the server_name buffer after the constructor
returns are affected. This is most likely for language bindings that pass
temporary strings. Callers that keep the server_name buffer alive for the
lifetime of the rustls_client_config are not affected.
Versions 0.12.0 through 0.15.6 are affected. Version 0.15.7+ changed these APIs to copy the input buffer.
Which versions are affected by RUSTSEC-2026-0413?
1 open source package ship an affected version, including rustls-ffi.
| Package | Affected | Fixed in |
|---|---|---|
rustls-ffi crates.io | From 0.12.0 | 0.15.7 |
How do I fix RUSTSEC-2026-0413?
Upgrade rustls-ffi to 0.15.7 or later.
Is RUSTSEC-2026-0413 being exploited?
There is no known exploitation of RUSTSEC-2026-0413 in the wild and no public exploit code.
Sources
Also known as GHSA-rc3f-4j82-cmrg.