{"id":"RUSTSEC-2026-0619","summary":"`Local` (`Rc`) backed strings and byte strings are `Send`, allowing data races","details":"Affected versions of this crate implemented `Send` for `HipByt\u003cB\u003e` (and so for\n`HipStr\u003cB\u003e`, `HipOsStr\u003cB\u003e` and `HipPath\u003cB\u003e`), and for the internal shared\npointer, whenever the backend `B` is `Send`. The thread-local backend `Local`\n(the `Local*` type aliases) keeps its reference count in a `Cell\u003cusize\u003e`, which\nis `Send` but not `Sync`: such a value could be sent to another thread while a\nclone stayed behind, and cloning, dropping or checking uniqueness on both\nthreads then updates or reads the count without synchronization.\n\nThis is a data race (undefined behavior) reachable from safe code, for example:\n\n```rust\nlet mut a = hipstr::LocalHipByt::with_capacity(62);\nlet b = a.clone();\nstd::thread::scope(|s| {\n    s.spawn(move || {\n        a.as_mut_ptr();\n    });\n    drop(b);\n});\n```\n\nThe default, thread-safe types (`HipStr`, `HipByt`, … with the `ThreadSafe`\nbackend) are not affected. Versions before 0.5.0 are not affected either: their\n`Local` backend was std's `Rc`, which is not `Send`.\n\nThe flaw was corrected in 0.8.1 by requiring the backend to be `Sync` in these\n`Send` implementations, so that `Local` values are no longer `Send`. The\naffected versions (0.5.0 to 0.8.0) have been yanked; 0.5, 0.6 and 0.7 users\nshould upgrade to 0.8.1.","modified":"2026-11-29T16:45:02.213737674Z","published":"2026-10-14T12:00:00Z","database_specific":{"license":"CC0-1.0"},"references":[{"type":"PACKAGE","url":"https://crates.io/crates/hipstr"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2026-0619.html"},{"type":"WEB","url":"https://github.com/polazarus/hipstr/pull/54"},{"type":"WEB","url":"https://github.com/polazarus/hipstr/releases/tag/0.8.1"}],"affected":[{"package":{"name":"hipstr","ecosystem":"crates.io","purl":"pkg:cargo/hipstr"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0.5.0"},{"fixed":"0.8.1"}]}],"ecosystem_specific":{"affected_functions":null,"affects":{"os":[],"functions":[],"arch":[]}},"database_specific":{"cvss":null,"informational":"unsound","categories":["thread-safety"],"source":"https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2026-0619.json"}}],"schema_version":"1.9.2"}