Email me

Rust advisories / rust-i18n-support

Unsound MediumRUSTSEC-2024-0007 · rust-i18n-support

RUSTSEC-2024-0007: Use-after-free when setting the locale

Short answerrust-i18n-support has an API that can cause undefined behaviour from safe code: Use-after-free when setting the locale. Fixed in 3.0.1.

Craterust-i18n-support
TypeUnsound (memory-exposure)
Affected versionsFrom 3.0.0 before 3.0.1.
Fixed in3.0.1
SeverityMedium (GitHub rating)
Published2024-01-19
Last changed2024-02-10
Also known asGHSA-c8v3-jhv9-4ppc
Affected functionsrust_i18n_support::AtomicStr::as_str

What to do

  1. See which version you have: cargo tree -i rust-i18n-support (it also shows which of your dependencies pulls it in).
  2. Update within your version requirement: cargo update -p rust-i18n-support. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for example rust-i18n-support = "3.0.1") or update the dependency that pulls it in.
  3. Check again with cargo audit, or paste your Cargo.lock into our Cargo.toml checker.

Details from the advisory

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.

References

From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.

Up next

Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ