# RUSTSEC-2026-0244: setlocale and TextDomain::init are unsound as they access environment with no synchronization

- Database: RustSec
- Published: 2026-08-06
- Modified: 2026-08-09

## Affected versions

- gettext-rs (crates.io): fixed in 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.

## References

- https://crates.io/crates/gettext-rs
- https://rustsec.org/advisories/RUSTSEC-2026-0244.html
- https://github.com/gettext-rs/gettext-rs/issues/64

Page: https://cve.now/RUSTSEC-2026-0244

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
