English

Containing Malicious Package Updates in npm with a Lightweight Permission System

Cryptography and Security 2021-03-11 v1 Software Engineering

Abstract

The large amount of third-party packages available in fast-moving software ecosystems, such as Node.js/npm, enables attackers to compromise applications by pushing malicious updates to their package dependencies. Studying the npm repository, we observed that many packages in the npm repository that are used in Node.js applications perform only simple computations and do not need access to filesystem or network APIs. This offers the opportunity to enforce least-privilege design per package, protecting applications and package dependencies from malicious updates. We propose a lightweight permission system that protects Node.js applications by enforcing package permissions at runtime. We discuss the design space of solutions and show that our system makes a large number of packages much harder to be exploited, almost for free.

Cite

@article{arxiv.2103.05769,
  title  = {Containing Malicious Package Updates in npm with a Lightweight Permission System},
  author = {Gabriel Ferreira and Limin Jia and Joshua Sunshine and Christian Kästner},
  journal= {arXiv preprint arXiv:2103.05769},
  year   = {2021}
}

Comments

13 pages

R2 v1 2026-06-23T23:56:28.264Z