Killing Two Birds with One Stone: Malicious Package Detection in NPM and PyPI using a Single Model of Malicious Behavior Sequence
Not on the map. Why?
Abstract (arXiv)
Open-source software (OSS) supply chain enlarges the attack surface, which makes package registries attractive targets for attacks. Recently, package registries NPM and PyPI have been flooded with malicious packages. The effectiveness of existing malicious NPM and PyPI package detection approaches is hindered by two challenges. The first challenge is how to leverage the knowledge of malicious packages from different ecosystems in a unified way such that multi-lingual malicious package detection can be feasible. The second challenge is how to model malicious behavior in a sequential way such that maliciousness can be precisely captured. To address the two challenges, we propose and implement Cerebro to detect malicious packages in NPM and PyPI. We curate a feature set based on a high-level abstraction of malicious behavior to enable multi-lingual knowledge fusing. We organize extracted features into a behavior sequence to model sequential malicious behavior. We fine-tune the BERT model to understand the semantics of malicious behavior. Extensive evaluation has demonstrated the effectiveness of Cerebro over the state-of-the-art as well as the practically acceptable efficiency. Cerebro has successfully detected 306 and 196 new malicious packages in PyPI and NPM, and received 385 thank letters from the official PyPI and NPM teams.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). First posted on arXiv 6 Sep 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 1; 2025: 1; 2026: 7.
9 papers.
- 2026Agent Skills in the Wild: An Empirical Study of Security Vulnerabilities at Scalecited by 105
- 2024We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMscited by 65
- 2026Context Matters: Repository-Aware Security Analysis of the Agent Skill Ecosystemcited by 11
- 2026Many Hands Make Light Work: An LLM-based Multi-Agent System for Detecting Malicious PyPI Packagescited by 1
- 2025One Detector Fits All: Robust and Adaptive Detection of Malicious Packages from PyPI to Enterprisescited by 0
- 2026CHASE: LLM Agents for Dissecting Malicious PyPI Packagescited by 0
- 2026MOLOT System Card: Malicious Operational Logic Observation Transformercited by 0
- 2026LLM-Enhanced Hierarchical Heterogeneous Graph Representation Learning for Malicious Python Package Detectioncited by 0
- 2026Stylometric Defenses Against Author Impersonation in Software Repositoriescited by 0
- 2026Stylometric Defenses Against Author Impersonation in Software Repositories3 Aug 2026
- 2026LLM-Enhanced Hierarchical Heterogeneous Graph Representation Learning for Malicious Python Package Detection3 Jul 2026
- 2026MOLOT System Card: Malicious Operational Logic Observation Transformer5 Jun 2026
- 2026Context Matters: Repository-Aware Security Analysis of the Agent Skill Ecosystem17 Mar 2026
- 2026Many Hands Make Light Work: An LLM-based Multi-Agent System for Detecting Malicious PyPI Packages17 Jan 2026
- 2026Agent Skills in the Wild: An Empirical Study of Security Vulnerabilities at Scale15 Jan 2026
- 2026CHASE: LLM Agents for Dissecting Malicious PyPI Packages11 Jan 2026
- 2025One Detector Fits All: Robust and Adaptive Detection of Malicious Packages from PyPI to Enterprises3 Dec 2025
- 2024We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs12 Jun 2024