uninitialized memory
Memory handed to a program without being cleared first, so it still contains whatever data was there before.
Leftover bytes can reveal secrets from other requests if they reach a response or log.
In more detail
Reading it can expose data from other parts of the program, such as tokens or passwords. Languages and libraries that zero memory before handing it out avoid the problem.
Related terms
- Buffer.alloc() and Buffer.allocUnsafe() — The two ways to create a new Buffer of a given size: alloc() fills it with zeros, while allocUnsafe() skips that step and may contain old data.
Taught in
- Buffer Fundamentals: Slab Allocator & V8 Memory — Node.js Internals & Backend Services