Advisory

GHSA-h5vj-f7r9-w564

Also known as: None

Summary

Entropy Backdoor in text-qrcode

Details

All versions of text-qrcode contain malicious code that overwrites the randomBytes method for the crypto module with a function that generates weak entropy. Instead of generating 32 bytes, the infected randomBytes will generate 3 bytes of entropy and hash them, resulting in a 32 byte value being returned, but one that is easily guessable.

Recommendation

Uninstall text-qrcode immediately. If the module was used to generate entropy that is load bearing, all such instances of generated entropy must be replaced. This includes things like bitcoin wallets, private keys, encrypted messages, etc.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2020-09-01 21:22 UTC
Modified
2021-10-01 13:30 UTC

Affected packages and fixes

text-qrcode

npm · All systems

Affected

  • introduced 0.0.0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences