Malicious Package Affecting text-qrcode package, versions *


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-TEXTQRCODE-73501
  • published10 Jan 2019
  • disclosed29 Nov 2018
  • creditUnknown

Introduced: 29 Nov 2018

Malicious CVE NOT AVAILABLE CWE-506  (opens in a new tab)

How to fix?

Avoid using text-qrcode altogether.

Overview

text-qrcode is a Malicious package that generated QR Code.

It contains a 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.

CVSS Base Scores

version 3.1