On the Feasibility of Cross-Language Detection of Malicious Packages in npm and PyPI
Not on the map. Why?
Abstract (arXiv)
Current software supply chains heavily rely on open-source packages hosted in public repositories. Given the popularity of ecosystems like npm and PyPI, malicious users started to spread malware by publishing open-source packages containing malicious code. Recent works apply machine learning techniques to detect malicious packages in the npm ecosystem. However, the scarcity of samples poses a challenge to the application of machine learning techniques in other ecosystems. Despite the differences between JavaScript and Python, the open-source software supply chain attacks targeting such languages show noticeable similarities (e.g., use of installation scripts, obfuscated strings, URLs). In this paper, we present a novel approach that involves a set of language-independent features and the training of models capable of detecting malicious packages in npm and PyPI by capturing their commonalities. This methodology allows us to train models on a diverse dataset encompassing multiple languages, thereby overcoming the challenge of limited sample availability. We evaluate the models both in a controlled experiment (where labels of data are known) and in the wild by scanning newly uploaded packages for both npm and PyPI for 10 days. We find that our approach successfully detects malicious packages for both npm and PyPI. Over an analysis of 31,292 packages, we reported 58 previously unknown malicious packages (38 for npm and 20 for PyPI), which were consequently removed from the respective repositories.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). First posted on arXiv 14 Oct 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 2; 2026: 3.
5 papers.
- 2026MalSkillBench: A Runtime-Verified Benchmark of Malicious Agent Skillscited by 14
- 2025AutoMalDesc: Large-Scale Script Analysis for Cyber Threat Researchcited by 1
- 2025One Detector Fits All: Robust and Adaptive Detection of Malicious Packages from PyPI to Enterprisescited by 0
- 2026eDySec: A Deep Learning-based Explainable Dynamic Analysis Framework for Detecting Malicious Packages in PyPI Ecosystemcited by 0
- 2026MOLOT System Card: Malicious Operational Logic Observation Transformercited by 0
- 2026MOLOT System Card: Malicious Operational Logic Observation Transformer5 Jun 2026
- 2026MalSkillBench: A Runtime-Verified Benchmark of Malicious Agent Skills5 Jun 2026
- 2026eDySec: A Deep Learning-based Explainable Dynamic Analysis Framework for Detecting Malicious Packages in PyPI Ecosystem29 Apr 2026
- 2025One Detector Fits All: Robust and Adaptive Detection of Malicious Packages from PyPI to Enterprises3 Dec 2025
- 2025AutoMalDesc: Large-Scale Script Analysis for Cyber Threat Research17 Nov 2025