Papers for

python application developers

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

Python imports trigger bugs and security issues before application runs

Python Import as an Execution Boundary: An Empirical Study of Bugs, Vulnerabilities, and Analysis Gaps

Abstract: Python import does more than resolve dependencies: it executes code during module and package initialization. This behavior can trigger failures, load dynamic or native code, access resources, or change security-sensitive state before an application calls a package API. Prior work studies package selection, malicious packages, or package vulnerabilities. We present ImportMine, a study of import-related bugs and security vulnerabilities in Python software. We combine security advisories with PyPI project histories and use source and patch evidence to confirm how import activates cases, why the problem occurs, how developers fix it, and what program information is needed to explain the behavior. We retain 31 import-related advisory vulnerabilities and 38 application-data boundary cases and confirm 1,429 project-history bugs across 1,302 repositories. Among the project-history bugs activated during initialization, 97.6% stop or disrupt normal execution. In contrast, 90.0% of the 20 initialization- activated advisory vulnerabilities are High or Critical. Module-level code and package initialization activate 98.3% of the analyzed history cases. Dynamic loading is much less common, but most of its cases perform security-sensitive actions. We also find that many fixes change when an import becomes active instead of removing the dependency. Finally, we derive ImportVulBench, 228 paired pre-fix and fixed programs covering all 11 bug types.

Sun 13 SeptCryptography and Security
The gist
Python imports don’t just bring in code—they actually run code when loading modules, which can cause bugs and security problems even before your program starts doing its main work. The authors studied many cases where these import-time actions caused failures or vulnerabilities, finding that nearly all bugs disrupted normal execution and many vulnerabilities were severe. They also showed that developers often fix these problems by changing when imports happen rather than removing dependencies. The authors provide a dataset of real bug fixes to help improve tools that find or prevent these issues.
Open → 2609.14791v1