SAGA: Versatile Python Vulnerability Detection

Arxiv pdf 2026-01-01T00:00:00
arXiv Paper — PDF not available. Only the Executive Summary is available here. To read or download the full paper, visit the arXiv abstract page.

Abstract

Python is one of the most popular programming languages; as such, projects written in Python involve an increasing number of diverse security vulnerabilities. However, existing state-of-the-art analysis tools for Python only support a few vulnerability types. Hence, there is a need to detect a large variety of vulnerabilities in Python projects. In this paper, we propose the SAGA approach for detecting and locating vulnerabilities in Python source code in a versatile way. SAGA includes a source code parser that extracts control- and data-flow information and represents it as a symbolic controlflow graph, as well as a domain-specific language that defines static aspects of the source code and their evolution during graph traversals. We have leveraged this language to define a library of static aspects for integrity, confidentiality, and other securityrelated properties. We have evaluated SAGA on a dataset of 108 vulnerabilities affecting 82 PyPi packages and covering 37 vulnerability types, obtaining 100% sensitivity and 99.15% specificity, with only one false positive, while outperforming four common security analysis tools. This analysis was performed in less than 31 seconds, i.e., between 2.5 and 512.1 times faster than the baseline tools.

Loading executive summary...

LINK COPIED TO CLIPBOARD