RUSTSEC-2026-0619
not scored yet`Local` (`Rc`) backed strings and byte strings are `Send`, allowing data races
Affected versions of this crate implemented Send for HipByt<B> (and so for
HipStr<B>, HipOsStr<B> and HipPath<B>), and for the internal shared
pointer, whenever the backend B is Send. The thread-local backend Local
(the Local* type aliases) keeps its reference count in a Cell<usize>, which
is Send but not Sync: such a value could be sent to another thread while a
clone stayed behind, and cloning, dropping or checking uniqueness on both
threads then updates or reads the count without synchronization.
This is a data race (undefined behavior) reachable from safe code, for example:
let mut a = hipstr::LocalHipByt::with_capacity(62);
let b = a.clone();
std::thread::scope(|s| {
s.spawn(move || {
a.as_mut_ptr();
});
drop(b);
});
The default, thread-safe types (HipStr, HipByt, … with the ThreadSafe
backend) are not affected. Versions before 0.5.0 are not affected either: their
Local backend was std's Rc, which is not Send.
The flaw was corrected in 0.8.1 by requiring the backend to be Sync in these
Send implementations, so that Local values are no longer Send. The same
fix was backported to 0.5.2, 0.6.1 and 0.7.1. The affected versions (0.5.0 to
0.8.0) have been yanked.
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | crates.io | hipstr | >= 0.5.0, < 0.5.2; >= 0.6.0, < 0.6.1; >= 0.7.0, < 0.7.1; >= 0.8.0, < 0.8.1 | 0.5.2, 0.6.1, 0.7.1, 0.8.1 |
References
- https://crates.io/crates/hipstr · PACKAGE
- https://rustsec.org/advisories/RUSTSEC-2026-0619.html · ADVISORY
- https://github.com/polazarus/hipstr/pull/54 · WEB
- https://github.com/polazarus/hipstr/releases/tag/0.8.1 · WEB
History
- 3 Dec 2026 13:56 UTC · OSV: affected list changed (1 entry); description edited
- 29 Nov 2026 18:02 UTC · OSV: first stored (published 14 Oct 2026)