Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Malware & Threats

Malicious ESLint Packages Steal Software Registry Login Tokens

Following the compromise of an ESLint maintainer’s account last week, malicious packages that attempted to steal login tokens from the npm software registry were published without authorization.

Following the compromise of an ESLint maintainer’s account last week, malicious packages that attempted to steal login tokens from the npm software registry were published without authorization.

 Originally created by Nicholas Zakas, ESLint is described as an open source “pluggable and configurable linter tool” for identifying and reporting on patterns in JavaScript.

The issue affected version 3.7.2 of the popular package eslint-scope, as well as version 5.0.2 of eslint-config-eslint. The former is a scope analysis library used by older versions of eslint, and the latest versions of babel-eslint and webpack, while the latter is a configuration used internally by the ESLint team.

Both packages were hosted on npm, “the package manager for JavaScript and the world’s largest software registry,” which has faced similar incidents before.

Upon installation, the rogue packages would download and execute code from pastebin.com. The code was designed to grab the content of the user’s .npmrc file, which usually contains access tokens for publishing to npm, and send the information to the attacker.

“The script extracts the _authToken from a user’s .npmrc and sends it to histats and statcounter inside the Referer header,” Henry Zhu notes.

Both of the malicious packages were unpublished from npm soon after the issue was discovered. Furthermore, the pastebin.com paste linked in these packages was taken down as well, ESLint explains in a post.

The npm login tokens targeted by the malicious code would not provide the attacker with the user’s npm password, but npm nonetheless decided to revoke possibly impacted tokens. Users too have the option to revoke existing tokens and npm advised them to do so.

Advertisement. Scroll to continue reading.

“We have now invalidated all npm tokens issued before 2018-07-12 12:30 UTC, eliminating the possibility of stolen tokens being used maliciously,” npm said.

The compromise was apparently possible because the maintainer had reused the same password on multiple accounts and also didn’t have two-factor authentication enabled on their npm account.

To ensure users are no longer at risk, ESLint published eslint-scope version 3.7.3 (with code from version 3.7.1) and eslint-config-eslint version 5.0.3.

The publishing of the updated packages doesn’t resolve the issue for all users, as those who installed the rogue packages would still need to do npm update or equivalent.

Related: Backdoored Module Removed from npm Registry

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

People on the Move

Mike Dube has joined cloud security company Aqua Security as CRO.

Cody Barrow has been appointed as CEO of threat intelligence company EclecticIQ.

Shay Mowlem has been named CMO of runtime and application security company Contrast Security.

More People On The Move

Expert Insights

Related Content

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...

Cybercrime

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

Malware & Threats

The NSA and FBI warn that a Chinese state-sponsored APT called BlackTech is hacking into network edge devices and using firmware implants to silently...

Cyberwarfare

An engineer recruited by intelligence services reportedly used a water pump to deliver Stuxnet, which reportedly cost $1-2 billion to develop.

Application Security

Virtualization technology giant VMware on Tuesday shipped urgent updates to fix a trio of security problems in multiple software products, including a virtual machine...

Malware & Threats

Apple’s cat-and-mouse struggles with zero-day exploits on its flagship iOS platform is showing no signs of slowing down.

Malware & Threats

Unpatched and unprotected VMware ESXi servers worldwide have been targeted in a ransomware attack exploiting a vulnerability patched in 2021.

Malware & Threats

Cisco is warning of a zero-day vulnerability in Cisco ASA and FTD that can be exploited remotely, without authentication, in brute force attacks.