npm Trusted Publishing Flaw With 10 Million Downloads Exposes 1,500+ Packages to Malicious Takeover
A flaw in npm's Trusted Publishing feature allowed attackers to take over over 1,500 packages by reclaiming GitHub repository names.
Overview
A security flaw in npm's Trusted PublishingA package registry feature that lets automated build pipelines publish releases without storing long-lived passwords feature exposed more than 1,500 packages to possible takeover through reclaimed GitHub repositoryA central storage place where a software project's source code, change history, and configuration files are kept names. The affected packages accounted for more than 10 million total downloads and over one million downloads per month, creating a serious software supply-chainAll the open-source libraries, build tools, code repositories, and update servers that go into making a program risk for developers, CI/CD systems, and organizations that rely on npm dependenciesAn external code library or package that a software project relies on to do part of its work. The issue, named SlugFest, did not require an attacker to steal an npm tokenA short-lived digital pass that a server gives a logged-in user or app, break into a maintainer'sThe developer or small team responsible for reviewing changes and publishing releases for an open-source project npm account, or access the original GitHub repository. Instead, a threat actorA person or group that carries out cyberattacks, whether for money, spying, or disruption could claim an abandoned GitHub owner/repository name and use it to receive a valid short-lived npm publishing credential for a package that still trusted that old location. Analysts at Bloom Security identified the flaw and noted that it was a package takeover path, not an active malware campaign. A successful takeover could allow malicious codeSoftware built to steal data, spy on users, lock files, or take control of a computer, including a harmful postinstall scriptA short program written in an interpreted language to automate tasks in a browser, shell, or application, to be published under a legitimate package name and delivered to users during normal dependency installation.
Terms in this story
- Trusted Publishing
- A package registry feature that lets automated build pipelines publish releases without storing long-lived passwords. Public registries encourage maintainers to switch to trusted publishing so a stolen developer laptop does not contain permanent tokens that could push malicious updates.
- repository
- A central storage place where a software project's source code, change history, and configuration files are kept. Software teams collaborate by pushing code to a shared repository, and attackers scan public repositories for accidentally committed API keys or try to poison popular projects.
- software supply-chain
- All the open-source libraries, build tools, code repositories, and update servers that go into making a program. Protecting the software supply chain means making sure no attacker has tampered with the third-party packages, build pipelines, or signing keys used to ship an application.
- supply-chain risk
- The danger that a flaw or breach at an outside supplier will compromise your organization. Even a company with strong internal defenses faces supply chain risk if its payroll vendor, law firm, or open-source software library gets breached.
- token
- A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. Security+ objective 4.6 lists the term
- maintainer's
- The developer or small team responsible for reviewing changes and publishing releases for an open-source project. Supply chain attackers often target a volunteer maintainer with phishing emails or offers to help, hoping to gain publishing rights over a popular code library.
- threat actor
- A person or group that carries out cyberattacks, whether for money, spying, or disruption. Security researchers use the term threat actor to refer to a criminal gang, state spy unit, or solo hacker behind a series of intrusions. Security+ objective 2.1 lists the term
- malicious code
- Software built to steal data, spy on users, lock files, or take control of a computer. News reports use malware as the umbrella term for viruses, ransomware, spyware, and trojans that criminals install on phones, laptops, or servers without permission. Security+ objective 2.4 lists the term
- script
- A short program written in an interpreted language to automate tasks in a browser, shell, or application. System administrators write scripts to automate daily maintenance, while attackers often use a script to download malware and disable security settings without dropping a compiled file.
- dependency
- An external code library or package that a software project relies on to do part of its work. When a popular open-source dependency has a security bug or gets hijacked by an attacker, every application that imports that package inherits the risk.
- OpenID Connect
- An identity layer on top of OAuth that lets websites verify who a user is. When you use a single sign-on button on a website, OpenID Connect provides a signed token telling the application your verified email address and user ID.
- OIDC
- An identity layer built on OAuth that lets apps verify user logins through a central provider. Many single sign-on portals use OIDC to issue a signed identity token confirming who just logged in and what email address they hold.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the Cyber Security News website. Cite the article, not this page.
Read the full article on Cyber Security News (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Vulnerability and patch
"...a security flaw in npms trusted publishing feature..." Found by reading the article; these exact words are in it - Who is affected: "...developers, CI/CD systems, and organizations..." Organizations using the product
Copied word for word from the article - Security+ 2.2 Explain common threat vectors and attack surfaces.
"......downloads per month, creating a serious software supply-chain risk for developers, CI/CD systems, and organizations..." Found in the opening sentences - Security+ 2.3 Explain various types of vulnerabilities.
"...npm Trusted Publishing Flaw With 10 Million Downloads Exposes 1,500+ Packages..." Found in the headline - Security+ 4.7 Explain the importance of automation and orchestration related to secure operations.
"......a serious software supply-chain risk for developers, CI/CD systems, and organizations that rely on npm..." Found in the opening sentences - Security+ 5.3 Explain the processes associated with third-party risk assessment and management.
"......downloads per month, creating a serious software supply-chain risk for developers, CI/CD systems, and organizations..." Found in the opening sentences - CYBR 101 week 2: the CIA triad, threat actors, risk and CVEs
"A security flaw in npm's Trusted Publishing feature exposed more..." Found in the opening sentences - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Knowledge of the concept of an advanced persistent threat (APT)
"...serious software supply-chain risk for developers..." Found by reading the article; these exact words are in it - Job skill (from the U.S. Department of Defense list of cybersecurity jobs): Manage dependencies and risks.
"Exposes 1,500+ Packages to Malicious Takeover..." Found by reading the article; these exact words are in it
How a story is connected to the course, and every objective, week and job role
Same story at other outlets
- Attackers Can Hijack npm Packages Without Stealing Developer Credentials
- Over 1,500 npm packages exposed by Trusted Publishing validation flaw
- npm Trusted Publishing flaw exposed 1,500+ npm packages to takeover