# GHSA-c8v3-jhv9-4ppc: Use-after-free when setting the locale

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-01-19T12:00:00.000Z
- Modified: 2024-02-10T16:26:48.561Z
- Also known as: RUSTSEC-2024-0007
- Weaknesses: CWE-416

## Description

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

If the locale is changed in one thread, another thread can have a stale -- possibly already freed -- reference to the stored string.

(As written by GitHub Advisory Database.)

## Affected

- rust-i18n-support (crates.io): from 3.0.0 before 3.0.1

## References

- <https://github.com/longbridgeapp/rust-i18n/issues/71> (report, web)
- <https://github.com/longbridgeapp/rust-i18n/commit/22e0609591a2c08930f52a0e6bc860f02a0e88c0> (web)
- <https://github.com/longbridgeapp/rust-i18n> (package)
- <https://rustsec.org/advisories/RUSTSEC-2024-0007.html> (advisory, web)
- <https://crates.io/crates/rust-i18n-support> (package)
- <https://github.com/longbridgeapp/rust-i18n/pull/72> (web)
- <https://github.com/longbridgeapp/rust-i18n/releases/tag/v3.0.1> (web)

## Sources

- GitHub Advisory Database: [GHSA-c8v3-jhv9-4ppc](https://github.com/advisories/GHSA-c8v3-jhv9-4ppc), CC-BY-4.0, modified 2024-02-10
- RustSec Advisory Database: [RUSTSEC-2024-0007](https://rustsec.org/advisories/RUSTSEC-2024-0007.html), CC0-1.0, modified 2024-02-10

---

Page: https://cve.day/GHSA-c8v3-jhv9-4ppc · Whole record: https://cve.day/GHSA-c8v3-jhv9-4ppc.json · Rebuilt by cve.day 2026-11-25T22:56:43.183Z
