Timeout-based race conditions make Uint8Array/Buffer.alloc non-zerofilled
A flaw in Node.js buffer allocation logic can expose uninitialized memory when allocations are interrupted by the vm module's timeout option. Under specific timing conditions, buffers allocated with Buffer.alloc and other TypedArray instances may contain leftover data from previous operations, allowing in-process secrets to leak or causing data corruption.
- Triaged in 3 hours
- Fixed in 2 months
- Disclosed after 3 months
Summary by the program
A flaw in Node.js's buffer allocation logic can expose uninitialized memory when allocations are interrupted, when using the vm module with the timeout option. Under specific timing conditions, buffers allocated with Buffer.alloc and other TypedArray instances like Uint8Array may contain leftover data from previous operations, allowing in-process secrets like tokens or passwords to leak or causing data corruption. While exploitation typically requires precise timing or in-process code execution, it can become remotely exploitable when untrusted input influences workload and timeouts, leading to potential confidentiality and integrity impact.
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 a race condition in the buffer allocation path where an interruption (such as a vm timeout) leaves the buffer uninitialised instead of zero-filled.
Impact
Could leak in-process secrets like tokens or passwords or cause data corruption; typically requires precise timing or in-process code execution, but may become remotely exploitable when untrusted input influences workload and timeouts.
What the attacker needed
Precise timing; in-process code execution or untrusted input influencing…
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.
When a program asks for a new block of memory, it expects that block to be empty (zeroed). Here, if the request is interrupted at just the right moment, the program can get back a block that still holds old data from earlier use. That old data might include passwords or tokens, so someone could read them.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.