Now on Demand Ransomware Resilience & Recovery Summit - All Sessions Available
Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Audits

GitHub Confirms Another Major NPM Security Defect

Microsoft-owned GitHub is again flagging major security problems in the npm registry, warning that a pair of newly discovered vulnerabilities continue to expose the soft underbelly of the open-source software supply chain.

Microsoft-owned GitHub is again flagging major security problems in the npm registry, warning that a pair of newly discovered vulnerabilities continue to expose the soft underbelly of the open-source software supply chain.

The first major bug, reported via GitHub’s bug bounty program on November 2, basically lets an attacker publish new versions of any npm package using an account without proper authorization. 

“We determined that this vulnerability was due to inconsistent authorization checks and validation of data across several microservices that handle requests to the npm registry. In this architecture, the authorization service was properly validating user authorization to packages based on data passed in request URL paths. However, the service that performs underlying updates to the registry data determines which package to publish based on the contents of the uploaded package file,” according to a note from GitHub security chief Mike Hanley.

Hanley said the discrepancy provided an avenue by which requests to publish new versions of a package would be authorized for one package but would actually be performed for a different, and potentially unauthorized, package. “We mitigated this issue by ensuring consistency across both the publishing service and authorization service to ensure that the same package is being used for both authorization and publishing,” he added.

GitHub said it fixed the underlying issue within six hours, but the company cannot be sure the flaw was never exploited in the wild.

[ READ: ‘Critical Severity’ Warning: Malware Found in Popular npm Packages ]

“This vulnerability existed in the npm registry beyond the timeframe for which we have telemetry to determine whether it has ever been exploited maliciously,” Hanley said.   

However, he said GitHub’s security response team is highly confident that this specific vulnerability “has not been exploited maliciously during the timeframe for which we have available telemetry, which goes back to September 2020.”

Advertisement. Scroll to continue reading.

Separately, on October 26, Hanley said GitHub’s security team identified an issue caused by routine maintenance of one of the project’s publicly available npm services. 

From the GitHub advisory:

During maintenance on the database that powers the public npm replica at replicate.npmjs.com, records were created that could expose the names of private packages. This briefly allowed consumers of replicate.npmjs.com to potentially identify the names of private packages due to records published in the public changes feed. No other information, including the content of these private packages, was accessible at any time. 

Package names in the format of @owner/package for private packages created prior to October 20 were exposed between October 21 13:12:10Z UTC and October 29 15:51:00Z UTC. Upon discovery of the issue, we immediately began work on implementing a fix and determining the scope of the exposure. On October 29, all records containing private package names were removed from the replication database. 

While these records were removed from the replicate.npmjs.com service on this date, the data on this service is consumed by third-parties who may have replicated the data elsewhere. To prevent this issue from occuring again, we have made changes to how we provision this public replication database to ensure records containing private package names are not generated during this process.

GitHub’s latest warning comes on the heels of two separate npm package manager compromises over the last month. In early November, GitHub confirmed that two popular npm package managers — the Coa parser and the rc configuration loader — were compromised and rigged with password-stealing malware.

[ READ: Codecov Bash Uploader Dev Tool Compromised in Supply Chain Hack ]

In late October, crypto-mining and password-stealing malware were found embedded in ua-parser-js, an npm package (JavaScript library) that counts close to 8 million downloads per week.

The npm hacks raised eyebrows because of the software supply chain implications and prompted an extremely urgent warning from GitHub that any computer with the embedded npm package “should be considered fully compromised.”

GitHub’s Hanley said the company is ramping up its investments in securing the npm registry, including plans to require two-factor authentication (2FA) during authentication for maintainers and admins of popular packages on npm, starting with a list of top packages in the first quarter of 2022. 

“We are currently evaluating next steps to ensure that the strongest and most user-friendly authentication options, such as WebAuthn, are available and accessible to developers using npm,” Hanley added.

Related: ‘Critical Severity’ Warning: Malware Found in Widely Deployed npm packages

Related: Malware Found Embedded in Popular JavaScript Library

Related: Codecov Bash Uploader Dev Tool Compromised in Supply Chain Hack

Related: Google Intros SLSA Framework to Enforce Supply Chain Integrity

Written By

Ryan Naraine is Editor-at-Large at SecurityWeek and host of the popular Security Conversations podcast series. He is a security community engagement expert who has built programs at major global brands, including Intel Corp., Bishop Fox and GReAT. Ryan is a founding-director of the Security Tinkerers non-profit, an advisor to early-stage entrepreneurs, and a regular speaker at security conferences around the world.

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

MSSP Dataprise has appointed Nima Khamooshi as Vice President of Cybersecurity.

Backup and recovery firm Keepit has hired Kim Larsen as CISO.

Professional services company Slalom has appointed Christopher Burger as its first CISO.

More People On The Move

Expert Insights

Related Content

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

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.

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.

Data Protection

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

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.