Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

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

Trending

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.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

Expert Insights

Related Content

Application Security

Cycode, a startup that provides solutions for protecting software source code, emerged from stealth mode on Tuesday with $4.6 million in seed funding.

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Cybercrime

The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.

Data Protection

The cryptopocalypse is the point at which quantum computing becomes powerful enough to use Shor’s algorithm to crack PKI encryption.

Cybercrime

A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Identity & Access

Zero trust is not a replacement for identity and access management (IAM), but is the extension of IAM principles from people to everyone and...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

Artificial Intelligence

The CRYSTALS-Kyber public-key encryption and key encapsulation mechanism recommended by NIST for post-quantum cryptography has been broken using AI combined with side channel attacks.