crypto.randomUUID() and randomInt() entropy caches are saved into user-land startup snapshots and SEAs, so every process repeats the same values
Node.js's crypto module stored the internal entropy caches behind randomUUID(), randomUUIDv7() and randomInt() inside user-land startup snapshots and single executable applications. If those functions were called while the snapshot was built, every process started from that snapshot would repeat the same values until the cache refilled, so identifiers could collide and be predicted.
- Triaged in under an hour
- Fixed in 26 days
- Disclosed after 58 days
Summary by the program
A flaw in Node.js crypto causes the internal entropy caches used by crypto.randomUUID(), crypto.randomUUIDv7(), and crypto.randomInt() to be saved into user-land startup snapshots (--build-snapshot) and single executable applications built with useSnapshot.
If any of these functions, or an API that relies on them such as URL.createObjectURL(), is called while the snapshot is built, every process started from that snapshot returns the same values until the cache is refilled: up to 127 UUIDs and about 1,000 randomInt() values. Identifiers expected to be unique can collide across processes, and values issued by one process can be predicted by observing another.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the snapshot serialisation captured the crypto module's internal entropy cache state, so a snapshot taken after random calls froze those cached values into every process started from it.
Impact
Identifiers expected to be unique could collide across processes, and values issued by one process could be predicted by observing another, though the exposure is bounded to up to 127 UUIDs and about 1,000 randomInt() values before the cache refills.
What the attacker needed
App built with --build-snapshot or useSnapshot; random function called during snapshot build
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Random identifiers are meant to be unpredictable and unique, so programs use a hidden store of fresh random numbers that gets topped up as it is used. This report says that store could be baked into a saved template of a running program, so every copy started from that template began with the same numbers. Anyone who saw one copy's values could then guess another copy's values, and two copies could produce the same identifier.
What is Crypto?
Encryption, signatures, randomness or certificate checks that do not protect what they claim to.