RUSTSEC-2026-0413

Source
https://rustsec.org/advisories/RUSTSEC-2026-0413
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0413.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2026-0413
Aliases
  • GHSA-rc3f-4j82-cmrg
Published
2026-10-26T12:00:00Z
Modified
2026-10-27T10:15:12Z
Summary
Use-after-free of caller-owned server name in client connection constructors
Details

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.

Database specific
{
    "license":  "CC0-1.0"
}
References

Affected packages

crates.io / rustls-ffi

Package

Name
rustls-ffi
View open source insights on deps.dev
Purl
pkg:cargo/rustls-ffi

Affected ranges

Type
SEMVER
Events
Introduced
0.12.0
Fixed
0.15.7

Ecosystem specific

{
    "affected_functions":  null,
    "affects":  {
        "arch":  [],
        "functions":  [],
        "os":  []
    }
}

Database specific

categories
[
    "memory-corruption"
]
cvss
null
informational
null
source
"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0413.json"