{"id":"GHSA-c8v3-jhv9-4ppc","aliases":["GHSA-c8v3-jhv9-4ppc","RUSTSEC-2024-0007"],"related":[],"kind":"vulnerability","state":"published","title":"Use-after-free when setting the locale","summary":"Version 3.0.0 introduced an `AtomicStr` type, that is used to store the current locale. It stores the locale as a raw pointer to an `Arc<String>`. The locale can be read with `AtomicStr::as_str()`. `AtomicStr::as_str()` does not increment the usage counter of the `Arc`.\n\nIf the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"Version 3.0.0 introduced an `AtomicStr` type, that is used to store the current locale. It stores the locale as a raw pointer to an `Arc<String>`. The locale can be read with `AtomicStr::as_str()`. `AtomicStr::as_str()` does not increment the usage counter of the `Arc`.\n\nIf the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.","format":"markdown","source":"ghsa"}],"published":"2024-01-19T12:00:00.000Z","modified":"2024-02-10T16:26:48.561Z","severity":{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.1"}],"ecosystem":"crates.io","package":"rust-i18n-support","purl":"pkg:cargo/rust-i18n-support","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"3.0.0","status":"affected","fixed":"3.0.1"}],"ecosystem":"crates.io","package":"rust-i18n-support","purl":"pkg:cargo/rust-i18n-support","source":"rustsec"}],"references":[{"url":"https://github.com/longbridgeapp/rust-i18n/issues/71","tags":["report","web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/longbridgeapp/rust-i18n/commit/22e0609591a2c08930f52a0e6bc860f02a0e88c0","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/longbridgeapp/rust-i18n","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2024-0007.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/rust-i18n-support","tags":["package"],"sources":["rustsec"]},{"url":"https://github.com/longbridgeapp/rust-i18n/pull/72","tags":["web"],"sources":["rustsec"]},{"url":"https://github.com/longbridgeapp/rust-i18n/releases/tag/v3.0.1","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-c8v3-jhv9-4ppc","url":"https://github.com/advisories/GHSA-c8v3-jhv9-4ppc","licence":"CC-BY-4.0","modified":"2024-02-10T16:26:48.561Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2024-0007","url":"https://rustsec.org/advisories/RUSTSEC-2024-0007.html","licence":"CC0-1.0","modified":"2024-02-10T16:26:48.561Z"}],"updatedAt":"2026-11-25T22:56:43.183Z"}