{"id":"GHSA-rc3f-4j82-cmrg","aliases":["GHSA-rc3f-4j82-cmrg","RUSTSEC-2026-0413"],"related":[],"kind":"vulnerability","state":"published","title":"Use-after-free of caller-owned server name in client connection constructors","summary":"In rustls-ffi 0.12.0 through 0.15.6, `rustls_client_connection_new()` and\n`rustls_client_connection_new_alpn()` retained a reference to the caller's\n`server_name` buffer after returning, rather than copying it. The API\ndocumentation did not require the buffer to outlive the call and as a result\nif the caller freed or reused the buffer, later TLS processing read freed\nmemory.\n\nClients that free or reuse the `server_name` buffer after the constructor\nreturns are affected. This is most likely for language bindings that pass\ntemporary strings. Callers that keep the `server_name` buffer alive for the\nlifetime of the `rustls_client_config` are not affected.\n\nVersions 0.12.0 through 0.15.6 are affected. Version 0.15.7+ changed these APIs\nto copy the input buffer.","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"In rustls-ffi 0.12.0 through 0.15.6, `rustls_client_connection_new()` and\n`rustls_client_connection_new_alpn()` retained a reference to the caller's\n`server_name` buffer after returning, rather than copying it. The API\ndocumentation did not require the buffer to outlive the call and as a result\nif the caller freed or reused the buffer, later TLS processing read freed\nmemory.\n\nClients that free or reuse the `server_name` buffer after the constructor\nreturns are affected. This is most likely for language bindings that pass\ntemporary strings. Callers that keep the `server_name` buffer alive for the\nlifetime of the `rustls_client_config` are not affected.\n\nVersions 0.12.0 through 0.15.6 are affected. Version 0.15.7+ changed these APIs\nto copy the input buffer.","format":"markdown","source":"rustsec"}],"published":"2026-10-26T12:00:00.000Z","modified":"2026-10-27T10:15:12.837Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.12.0","status":"affected","fixed":"0.15.7"}],"ecosystem":"crates.io","package":"rustls-ffi","purl":"pkg:cargo/rustls-ffi","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/rustls-ffi","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2026-0413.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/rustls/rustls-ffi/releases/tag/v/0.15.7","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2026-0413","url":"https://rustsec.org/advisories/RUSTSEC-2026-0413.html","licence":"CC0-1.0","modified":"2026-10-27T10:15:12.837Z"}],"updatedAt":"2026-11-25T22:56:43.456Z"}