IntelligenceFindingsNMN-2026-0176
Rand is unsound with a custom logger using `rand::rng()`
CandidateMachine- or researcher-generated; not independently verified.
In short
What to know.
- Package
- rand crates.iorand: from 0.10.0 before 0.10.1
- What to do
- Upgrade rand to 0.8.6 or 0.9.3 or 0.10.1 or later.
- Severity
- UnknownRated by the source advisory.
- Confidence
- HighThe affected range comes from the advisory; no system that uses the component has been assessed.
Verification
Where it stands.
- Candidate
- In review
- Reproduced
- Confirmed
- Resolved
- Disputed
- Withdrawn
6 listed
Sources
- OSV record RUSTSEC-2026-0097osv.devRetrieved 3 December 2026
- package reference for RUSTSEC-2026-0097crates.ioRetrieved 3 December 2026
- advisory reference for RUSTSEC-2026-0097rustsec.orgRetrieved 3 December 2026
- web reference for RUSTSEC-2026-0097github.comRetrieved 3 December 2026
- OSV record GHSA-cq8v-f236-94qcosv.devRetrieved 3 December 2026
- package reference for GHSA-cq8v-f236-94qcgithub.comRetrieved 3 December 2026
Full record
- Finding
- NMN-2026-0176
- Category
- vulnerability
- Component
- rand (crates.io)rand: from 0.10.0 before 0.10.1
- Severity
- Unknown. Rated by the source advisory.The source advisory RUSTSEC-2026-0097 gives no severity label. Noumen has not assessed it.
- Confidence
- High.The affected range comes from the advisory; no system that uses the component has been assessed.
- State
- Candidate. Machine- or researcher-generated; not independently verified.
- Disclosure
- Public
- Mitigation
- Upgrade rand to 0.8.6 or 0.9.3 or 0.10.1 or later.
- Discovery method
- imported from a public advisory by the Advisory Monitor (1.0.0)Machine-generated by the agent advisory-monitor@1.0.0.
- Reproduction
- No reproduction steps recorded.
- Related advisories
- GHSA-cq8v-f236-94qcRUSTSEC-2026-0097
- Affected systems
- None listed. A link to a system needs its own evidence.
- Attribution
- Researcher: advisory-monitor@1.0.0 (agent, machine-generated)Validators: None yet
- Assigned reviewer
- Nobody yet
- Dates
- Created 3 December 2026, 16:52 UTCUpdated 3 December 2026, 16:52 UTC
Summary, as published by the source advisory
2 events, oldest first
History
History verified: 2 eventsLatest hash9d985bb11f0c9d985bb11f0c4218149373d1913a6810d1b9b1e24743134cba45c2d71509407b
Record createdMachine-generated
By advisory-monitor@1.0.0 (agent, machine-generated)
Reason: Imported from public advisory GHSA-cq8v-f236-94qc.
Entered the record in the state Candidate.
Event 1 hash318635aaa784318635aaa7840d8474f015ffa156ab37c08d8de6b5072fe8954425b5d0a5f3c5CorrectionMachine-generated
By advisory-monitor@1.0.0 (agent, machine-generated)
Reason: The source advisory RUSTSEC-2026-0097 changed.
Event 2 hashTitle
Before
Rand is unsound with a custom logger using rand::rng()
After
Rand is unsound with a custom logger using `rand::rng()`
Sources
Before
[ { "url": "https://osv.dev/vulnerability/GHSA-cq8v-f236-94qc", "title": "OSV record GHSA-cq8v-f236-94qc", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-random/rand/pull/1763", "title": "web reference for GHSA-cq8v-f236-94qc", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-random/rand", "title": "package reference for GHSA-cq8v-f236-94qc", "retrieved": "2026-12-03" }, { "url": "https://rustsec.org/advisories/RUSTSEC-2026-0097.html", "title": "web reference for GHSA-cq8v-f236-94qc", "retrieved": "2026-12-03" } ]
After
[ { "url": "https://osv.dev/vulnerability/RUSTSEC-2026-0097", "title": "OSV record RUSTSEC-2026-0097", "retrieved": "2026-12-03" }, { "url": "https://crates.io/crates/rand", "title": "package reference for RUSTSEC-2026-0097", "retrieved": "2026-12-03" }, { "url": "https://rustsec.org/advisories/RUSTSEC-2026-0097.html", "title": "advisory reference for RUSTSEC-2026-0097", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-random/rand/pull/1763", "title": "web reference for RUSTSEC-2026-0097", "retrieved": "2026-12-03" }, { "url": "https://osv.dev/vulnerability/GHSA-cq8v-f236-94qc", "title": "OSV record GHSA-cq8v-f236-94qc", "retrieved": "2026-12-03" }, { "url": "https://github.com/rust-random/rand", "title": "package reference for GHSA-cq8v-f236-94qc", "retrieved": "2026-12-03" } ]
Summary
Before
It has been reported (by @lopopolo) that the `rand` library is [unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library) (i.e. that safe code using the public API can cause Undefined Behaviour) when all the following conditions are met: - The `log` and `thread_rng` features are enabled - A [custom logger](https://docs.rs/log/latest/log/#implementing-a-logger) is defined - The custom logger accesses `rand::rng()` (previously `rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`) methods on `ThreadRng` - The `ThreadRng` (attempts to) reseed while called from the custom logger (this happens every 64 kB of generated data) - Trace-level logging is enabled or warn-level logging is enabled and the random source (the `getrandom` crate) is unable to provide a new seed `TryRng` (previously `RngCore`) methods for `ThreadRng` use `unsa... (444 more characters)
After
It has been reported (by [@lopopolo](https://github.com/lopopolo)) that the `rand` library is [unsound](https://rust-lang.github.io/unsafe-code-guidelines/glossary.html#soundness-of-code--of-a-library) (i.e. that safe code using the public API can cause Undefined Behaviour) when all the following conditions are met: - The `log` and `thread_rng` features are enabled - A [custom logger](https://docs.rs/log/latest/log/#implementing-a-logger) is defined - The custom logger accesses `rand::rng()` (previously `rand::thread_rng()`) and calls any `TryRng` (previously `RngCore`) methods on `ThreadRng` - The `ThreadRng` (attempts to) reseed while called from the custom logger (this happens every 64 kB of generated data) - Trace-level logging is enabled or warn-level logging is enabled and the random source (the `getrandom` crate) is unable to provide a new seed `TryRng` (previously `RngCore`) me... (475 more characters)
Affected versions
Before
[ { "name": "rand", "ranges": [ { "fixed": "0.9.3", "introduced": "0.9.0" } ], "ecosystem": "crates.io" }, { "name": "rand", "ranges": [ { "fixed": "0.10.1", "introduced": "0.10.0" } ], "versions": [ "0.10.0" ], "ecosystem": "crates.io" }, { "name": "rand", "ranges": [ { "fixed": "0.8.6", "introduced": "0.7.0" } ], "ecosystem": "crates.io" } ]
After
[ { "name": "rand", "ranges": [ { "fixed": "0.10.1", "introduced": "0.10.0" } ], "ecosystem": "crates.io" } ]
Severity
Before
low
After
unknown
Mitigation
Before
Upgrade rand to 0.9.3 or later. Upgrade rand to 0.10.1 or later. Upgrade rand to 0.8.6 or later.
After
Upgrade rand to 0.8.6 or 0.9.3 or 0.10.1 or later.
severityRationale
Before
Severity as labelled by the source advisory GHSA-cq8v-f236-94qc. Noumen has not assessed it.
After
The source advisory RUSTSEC-2026-0097 gives no severity label. Noumen has not assessed it.
9d985bb11f0c9d985bb11f0c4218149373d1913a6810d1b9b1e24743134cba45c2d71509407b
About this record
Severity and confidence are rated separately, each with its own reason.
History events are never edited or deleted. Each stores the hash of the one before, so a later change breaks the chain.
Corrections keep the value before and after.