RustSec logo

HistoryEditJSON (OSV)

RUSTSEC-2026-0244

setlocale and TextDomain::init are unsound as they access environment with no synchronization

Reported
Issued
Package
gettext-rs (crates.io)
Type
INFO Unsound
Categories
References
Patched
  • >=0.8.0
Affected Functions
Version
gettext_rs::TextDomain::init
  • <0.8.0
gettext_rs::setlocale
  • <0.8.0

Description

setlocale and TextDomain::init are unsound and may allow safe code to exhibit undefined behavior when called in a multi-threaded program.

The flaw is fixed in 0.8.0 by marking these functions unsafe and documenting the conditions under which they can be called safely.

Advisory available under CC0-1.0 license.