mlsanityData to 14 Oct 2026

An Empirical Study of Vulnerabilities in Python Packages and Their Detection

arXiv 2509.04260 ↗First posted 4 Sep 2025cs.SE cs.AI cs.CRcited by 2

Not on the map. Why?

Abstract (arXiv)

In the rapidly evolving software development landscape, Python stands out for its simplicity, versatility, and extensive ecosystem. Python packages, as units of organization, reusability, and distribution, have become a pressing concern, highlighted by the considerable number of vulnerability reports. As a scripting language, Python often cooperates with other languages for performance or interoperability. This adds complexity to the vulnerabilities inherent to Python packages, and the effectiveness of current vulnerability detection tools remains underexplored. This paper addresses these gaps by introducing PyVul, the first comprehensive benchmark suite of Python-package vulnerabilities. PyVul includes 1,157 publicly reported, developer-verified vulnerabilities, each linked to its affected packages. To accommodate diverse detection techniques, it provides annotations at both commit and function levels. An LLM-assisted data cleansing method is incorporated to improve label accuracy, achieving 100% commit-level and 94% function-level accuracy, establishing PyVul as the most precise large-scale Python vulnerability benchmark. We further carry out a distribution analysis of PyVul, which demonstrates that vulnerabilities in Python packages involve multiple programming languages and exhibit a wide variety of types. Moreover, our analysis reveals that multi-lingual Python packages are potentially more susceptible to vulnerabilities. Evaluation of state-of-the-art detectors using this benchmark reveals a significant discrepancy between the capabilities of existing tools and the demands of effectively identifying real-world security issues in Python packages. Additionally, we conduct an empirical review of the top-ranked CWEs observed in Python packages, to diagnose the fine-grained limitations of current detection tools and highlight the necessity for future advancements in the field.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 17 of its 73 references that are in the map. First posted on arXiv 4 Sep 2025.

Builds on

17 of 73 references.

References · 17

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2023Large Language Models for Code: Security Hardening and Adversarial Testingcited by 155
  5. 2020Deep Learning based Vulnerability Detection: Are We There Yet?cited by 144
  6. 2024Vulnerability Detection with Code Language Models: How Far Are We?cited by 139
  7. 2018Automated Vulnerability Detection in Source Code Using Deep Representation Learningcited by 114
  8. 2023DiverseVul: A New Vulnerable Source Code Dataset for Deep Learning Based Vulnerability Detectioncited by 102
  9. 2021CVEfixes: Automated Collection of Vulnerabilities and Their Fixes from Open-Source Softwarecited by 91
  10. 2023Security Weaknesses of Copilot-Generated Code in GitHub Projects: An Empirical Studycited by 38
  11. 2024ReposVul: A Repository-Level High-Quality Vulnerability Datasetcited by 36
  12. 2024Top Score on the Wrong Exam: On Benchmarking in Machine Learning for Vulnerability Detectioncited by 28
5 more
  1. 2021PyCG: Practical Call Graph Generation in Pythoncited by 17
  2. 2022VUDENC: Vulnerability Detection with Deep Learning on a Natural Codebase for Pythoncited by 17
  3. 2024Toward Improved Deep Learning-based Vulnerability Detectioncited by 9
  4. 2024How Well Do Large Language Models Serve as End-to-End Secure Code Agents for Python?cited by 7
  5. 2017An Empirical Study on Android-related Vulnerabilitiescited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.