[Paper Review] Towards Measuring Supply Chain Attacks on Package Managers for Interpreted Languages
This paper proposes a comparative framework and analysis pipeline, MalOSS, to detect supply chain attacks in interpreted language package managers (PyPI, Npm, RubyGems) using metadata, static, and dynamic analysis. It identified 339 malicious packages, with 278 (82%) removed and three assigned CVEs, offering actionable security improvements for registry maintainers.
Package managers have become a vital part of the modern software development process. They allow developers to reuse third-party code, share their own code, minimize their codebase, and simplify the build process. However, recent reports showed that package managers have been abused by attackers to distribute malware, posing significant security risks to developers and end-users. For example, eslint-scope, a package with millions of weekly downloads in Npm, was compromised to steal credentials from developers. To understand the security gaps and the misplaced trust that make recent supply chain attacks possible, we propose a comparative framework to qualitatively assess the functional and security features of package managers for interpreted languages. Based on qualitative assessment, we apply well-known program analysis techniques such as metadata, static, and dynamic analysis to study registry abuse. Our initial efforts found 339 new malicious packages that we reported to the registries for removal. The package manager maintainers confirmed 278 (82%) from the 339 reported packages where three of them had more than 100,000 downloads. For these packages we were issued official CVE numbers to help expedite the removal of these packages from infected victims. We outline the challenges of tailoring program analysis tools to interpreted languages and release our pipeline as a reference point for the community to build on and help in securing the software supply chain.
Motivation & Objective
- To systematically analyze and compare the security and functional features of package managers for interpreted languages.
- To identify root causes and attack vectors behind recent supply chain compromises in registries like PyPI, Npm, and RubyGems.
- To develop a reusable, extensible analysis pipeline for detecting malicious packages at scale.
- To provide actionable, evidence-based recommendations for improving registry security and hardening the software supply chain.
- To release the MalOSS pipeline and malware samples to support community and future research.
Proposed method
- Design a comparative framework to evaluate functional, security, and trust-related features across package manager ecosystems.
- Implement MalOSS, a custom pipeline combining metadata analysis, static code analysis, and dynamic execution monitoring tailored for interpreted languages.
- Apply the pipeline to over one million packages across PyPI, Npm, and RubyGems to detect anomalies and malicious behavior.
- Use passive-DNS data to estimate the real-world spread of detected malicious packages.
- Leverage threat intelligence services (e.g., VirusTotal) and manual verification to reduce false positives and confirm known attacks.
- Report findings to registry maintainers and coordinate with CVE authorities for high-risk packages.
Experimental results
Research questions
- RQ1What are the key security and functional differences among package managers for interpreted languages that contribute to supply chain attack surface?
- RQ2How do malicious packages in PyPI, Npm, and RubyGems exploit trust and abuse registry mechanisms?
- RQ3To what extent can existing program analysis techniques (static, dynamic, metadata) detect real-world supply chain attacks in interpreted language ecosystems?
- RQ4What is the real-world impact and propagation rate of detected malicious packages, as estimated via passive-DNS data?
- RQ5What actionable improvements can be proposed to strengthen trust, detection, and remediation in package manager ecosystems?
Key findings
- The MalOSS pipeline detected 7 malicious packages in PyPI, 41 in Npm, and 291 in RubyGems, totaling 339 reported packages.
- Of the 339 reported packages, 278 (82%) were successfully removed by registry maintainers after confirmation.
- Three of the reported malicious packages had over 100,000 downloads each and were assigned official CVE identifiers.
- The study revealed sophisticated attack patterns, including credential theft, remote code execution, and social engineering via typosquatting.
- Passive-DNS analysis indicated widespread distribution of some malicious packages, confirming their real-world impact.
- The framework and pipeline were successfully used to identify and validate threats, demonstrating the feasibility of large-scale, automated detection in interpreted language ecosystems.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.