A Vulnerability In an NPM Package Could Allow for Remote Code Execution

ITS Advisory Number: 
2021-136
Date(s) Issued: 
Tuesday, October 26, 2021
Subject: 
A Vulnerability In an NPM Package Could Allow for Remote Code Execution
Overview: 

A vulnerability has been discovered in the NPM package ua-parser-js that could allow for remote code execution upon installation of the affected versions. NPM is the default package manager for the Javascript runtime environment Node.js and ua-parser-js is a popular package within NPM that is used for detecting browser, engine, OS, CPU and device type and model information from User-Agent data.

 

THREAT INTELLIGENCE:

There are reports of this vulnerability being actively exploited for malicious purpose.

 

Systems Affected: 
  • ua-parser-js version 0.7.29, 0.8.0, and 1.0.0
RISK
GOVERNMENT
Large and medium government entities: 
Medium
Small government entities: 
Medium
BUSINESS
Large and medium business entities: 
Medium
Small business entities: 
Medium
Home Users: 
Low
Description: 

A vulnerability has been discovered in the NPM package ua-parser-js that could allow for remote code execution upon installation of the affected versions. Malicious actors uploaded a version of ua-parser-js that contains several malicious scripts. The scripts are executed during installation and download additional malicious files that have been reported to run a cryptocurrency miner, steal saved passwords, export OS credentials, and copy the cookies database file from Chrome.

Actions: 
  • After appropriate testing, immediately apply patches provided by NPM to vulnerable systems.
  • All secrets and keys stored on infected machines should be rotated immediately from a different machine.
  • Remind users not to download, accept or execute files from untrusted and unknown sources.
  • Remind users not to visit untrusted websites or follow links provided by untrusted or unknown sources.