|
|
|
NPM UUID's random number gen contains shared mutable state bug since 3 weeks
|
|
2 points
by jbverschoor
34 days ago
|
|
(copied from the other thread) Changed 3 weeks ago: uuid/src/rng.ts : the random array is const. Every call will share the same random number. Subsequent call will update your old random code, so if you generated something important... good luck The old code used to do a slice() which creates a new copy. https://github.com/uuidjs/uuid/blob/e1f42a354593093ba0479f0b...
became https://github.com/uuidjs/uuid/blob/f2c235f93059325fa43e1106... Welp.. time to patch and update everything again. Another day, another npm-package headache. Very odd() Attack vector: call the rng(), and send the result somewhere. You now have now overwritten someone else's "random number" and know about it. The fun things you can do with those numbers! |
|
Didn't actually want to write a test myself.. but I miss Claudia confirmed it. Pretty concerning.
Synchronous / serial calls:
output: and aynchronous calls: output: