mlsanityData to 13 Oct 2026

An Empirical Study of Malicious Code In PyPI Ecosystem

arXiv 2309.11021 ↗First posted 20 Sep 2023cs.SEcited by 19

Not on the map. Why?

Abstract (arXiv)

PyPI provides a convenient and accessible package management platform to developers, enabling them to quickly implement specific functions and improve work efficiency. However, the rapid development of the PyPI ecosystem has led to a severe problem of malicious package propagation. Malicious developers disguise malicious packages as normal, posing a significant security risk to end-users. To this end, we conducted an empirical study to understand the characteristics and current state of the malicious code lifecycle in the PyPI ecosystem. We first built an automated data collection framework and collated a multi-source malicious code dataset containing 4,669 malicious package files. We preliminarily classified these malicious code into five categories based on malicious behaviour characteristics. Our research found that over 50% of malicious code exhibits multiple malicious behaviours, with information stealing and command execution being particularly prevalent. In addition, we observed several novel attack vectors and anti-detection techniques. Our analysis revealed that 74.81% of all malicious packages successfully entered end-user projects through source code installation, thereby increasing security risks. A real-world investigation showed that many reported malicious packages persist in PyPI mirror servers globally, with over 72% remaining for an extended period after being discovered. Finally, we sketched a portrait of the malicious code lifecycle in the PyPI ecosystem, effectively reflecting the characteristics of malicious code at different stages. We also present some suggested mitigations to improve the security of the Python open-source ecosystem.

Key facts. Cited by 19 papers in the map (data through 13 Oct 2026). First posted on arXiv 20 Sep 2023.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 13 Oct)

Citing papers per year: 2024: 1; 2025: 6; 2026: 12.

19 papers.

Sort:

By area:

  1. 2026"Do Not Mention This to the User": Detecting and Understanding Malicious Agent Skills in the Wildcited by 48
  2. 2024Leveraging Large Language Models to Detect npm Malicious Packagescited by 6
  3. 2026ClawHub Security Signals: When VirusTotal, Static Analysis, and SkillSpector Disagreecited by 5
  4. 2025Detecting Malicious Source Code in PyPI Packages with LLMs: Does RAG Come in Handy?cited by 3
  5. 2025Automatically Generating Rules of Malicious Software Packages via Large Language Modelcited by 2
  6. 2025AutoMalDesc: Large-Scale Script Analysis for Cyber Threat Researchcited by 1
  7. 2025Casting a SPELL: Sentence Pairing Exploration for LLM Limitation-breakingcited by 1
  8. 2026Many Hands Make Light Work: An LLM-based Multi-Agent System for Detecting Malicious PyPI Packagescited by 1
  9. 2026Setup Complete, Now You Are Compromised: Weaponizing Setup Instructions Against AI Coding Agentscited by 1
  10. 2026Broken on Arrival: Silently Defective LLM Artifacts in Public Model Registries and How to Catch Themcited by 1
  11. 2025Leveraging Code Cohesion Analysis to Identify Source Code Supply Chain Attackscited by 0
  12. 2025One Detector Fits All: Robust and Adaptive Detection of Malicious Packages from PyPI to Enterprisescited by 0
7 more
  1. 2026CHASE: LLM Agents for Dissecting Malicious PyPI Packagescited by 0
  2. 2026One RNG to Rule Them All: How Randomness Becomes an Attack Vector in Machine Learningcited by 0
  3. 2026eDySec: A Deep Learning-based Explainable Dynamic Analysis Framework for Detecting Malicious Packages in PyPI Ecosystemcited by 0
  4. 2026LCC-LLM: Leveraging Code-Centric Large Language Models for Malware Attributioncited by 0
  5. 2026LLM-Enhanced Hierarchical Heterogeneous Graph Representation Learning for Malicious Python Package Detectioncited by 0
  6. 2026Which Neurons Detect Malicious Code? A Probing Study of LLM Security Knowledgecited by 0
  7. 2026From Adoption to Deployment: A Qualitative Study on AI Integration in Software Development Practicecited by 0