Connect with us

Hi, what are you looking for?


Application Security

GitHub Patches Security Flaws in Core Node.js Dependencies

GitHub has published documentation on seven vulnerabilities in the Node.js packages and warned that exploitation could expose users to code execution attacks.

GitHub has published documentation on seven vulnerabilities in the Node.js packages and warned that exploitation could expose users to code execution attacks.

“These vulnerabilities may result in arbitrary code execution due to file overwrite and creation when tar is used to extract untrusted tar files or when the npm CLI is used to install untrusted npm packages under certain file system conditions,” GitHub said in an advisory.

A code npm dependency, tar is used to extract and install npm packages. Thousands of projects depend on it and tar has tens of millions of weekly downloads. A core dependency for the npm CLI, @npmcli/arborist allows for the management of node_modules trees.

Four of the identified security holes (two in tar: CVE-2021-32804 and CVE-2021-37713; and two in @npmcli/arborist: CVE-2021-39134 and CVE-2021-39135) impact the npm CLI when a malicious or untrusted npm package is installed and could lead to code execution even when using the –ignore-scripts argument.

Upon package installation, npm CLI ensures contents are written to the appropriate folders only, but the vulnerabilities cross these security boundaries and may lead to arbitrary file overwrites during installation, and subsequent code execution.

Given the large number of projects that depend on tar, GitHub started working on fixes immediately after identifying the issue and also began scanning the npm registry for malicious packages targeting CVE-2021-32804, but says none was identified.

“The scan completed on August 5, 2021 and we did not detect any malicious packages targeting CVE-2021-32804. Note that exploitation of these issues through the npm CLI requires installation of untrusted packages or processing untrusted tar archives using affected versions of tar,” the company said.

The vulnerabilities are addressed in npm CLI versions 6.14.15, 7.21.0, or newer; latest Node.js releases (as of August 31, patches were included in Node 12, 14, and 16); and tar versions 4.4.19, 5.0.11, and 6.1.10.

Advertisement. Scroll to continue reading.

Several of the identified issues were reported to GitHub by Robert Chen (@chen-robert) and Philip Papurt (@ginkoid). As part of a private security bug bounty program, they received a total bounty payout of $14,500 for the reports.

Related: Critical Flaw in Pac-Resolver NPM Package Affects 290,000 Repositories

Related: Code Generated by GitHub Copilot Can Introduce Vulnerabilities

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment


Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Learn how to utilize tools, controls, and design models needed to properly secure cloud environments.


Event: ICS Cybersecurity Conference

The leading industrial cybersecurity conference for Operations, Control Systems and IT/OT Security professionals to connect on SCADA, DCS PLC and field controller cybersecurity.


People on the Move

SaaS security company AppOmni has hired Joel Wallenstrom as its General Manager.

FTI Consulting has appointed Brett Callow as Managing Director in its Cybersecurity & Data Privacy Communications practice.

Mobile security firm Zimperium has welcomed David Natker as its VP of Global Partners and Alliances.

More People On The Move

Expert Insights