Welcome back to the Patchstack Weekly Security Update for November 18th, 2021!
In this update, I will talk about some security concerns behind package management systems and cover GitHub’s commitment to security as it pertains to their own package management system, the NPM registry.
I will then go on to answer the questions: “Are attackers targeting software repositories?” and “How could they monetize software package repositories?”
GitHub’s commitment to security
NPM or the Node Package Manager is a popular package management system for Node.js and had some important security news announced recently.
The GitHub security team announced their commitment to NPM security and openly spoke about how NPM packages are being targeted by attackers. How are the packages being hacked?
A common flaw: weak passwords leading to the developer’s account being taken over.
It is unfortunate that these accounts are being hacked, but a reminder that a secure password is always necessary.
The article goes on to report 2 security issues found on the NPM services recently. One data leak and one severe bug were reported to their bug bounty program. The data leak was related to private repository names, having been exposed during routine maintenance, this was a temporary problem with likely minimal impact.
The severe issue was a bug found in the authentication mechanisms, leading to a possible scenario where someone could publish updates to a package without the need for authentication. This second unauthenticated package update issue was reported to GitHub by two bug bounty researchers and could have been a serious issue had this information gotten into the wrong hands.
GitHub reports that they saw no evidence of this vulnerability being used by malicious parties as far back as their logs go.
Is NPM safe?
Yes, NPM is safe. Do not be startled by the contents of the post, it was GitHub showing you some good old fashion honesty and transparency. As they are the stewards of NPM’s security, this is a good thing.
GitHub also went on to let you know they will be enforcing stronger authentication requirements (2FA) for the account that have access to popular packages in the registry. Users of NPM can be assured that the packages and systems managing the packages, can be trusted.
Software repositories like NPM are ubiquitous now, so the concern about the security of software repositories is something everyone who uses technology should be aware of.
On your phone, you probably download apps via the Apple app store or Google play. Browsers support extensions. Docker has Docker Hub. WordPress websites have plugins and theme repositories.
Are attackers targeting software repositories?
In the GitHub post, they said these attacks are successful due to developers choosing insecure passwords, but could also be when a package owner decides to betray their users and begins pushing malicious code, this would be an unethical way to monetize a product offered for free.
What are attackers doing to monetize these packages?
The attackers could do anything on the device since they’re able to run code. I would suspect a crypto-miner could be fruitful, but they could just as easily use the infected device, browser, or website to add one more node in a large bot-net to perform further attacks.
Thanks and appreciation
Thanks to this Patchstack weekly goes out to all of the package repository security stewards, which likely have a variety of titles, backgrounds, and experience, but they are the ones committed to reviewing and protecting their respective code repository.
Thanks go out to those taking on this task which may normally be a thankless job. But not today, I share my thanks to you for being a line of defense that keeps our trust in a community of developers who wish to distribute code for the world to use.
Special thanks go out to the GitHub security team for the transparent write-up about security within the NPM registry and to the two security researchers Kajetan Grzybowski (DrBrix) and Maciej Piechota (haqpl) for finding and reporting the critical issue they found.
I will be back with more security tips and news on next week’s edition of Patchstack Weekly Security Update!