Skip to content
OpenAdvisories
Unscored RUSTSEC-2026-0244

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

Published Aug 6, 2026 · Updated Aug 9, 2026 · Assigned by RUSTSEC

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.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io gettext-rs >= 0.0.0-0, < 0.8.0 0.8.0 RUSTSEC-2026-0244

References