Beyond Source: An Empirical Study of Python Bytecode Security Risks
Baihong ChenTXTian XieWLWen Li
Baihong Chen
TXTian Xie
WLWen Li
+3
This empirical study identifies Python bytecode as a security risk beyond source-centric analysis. By examining 1,034,843 PyPI artifacts, it finds 7,388 bytecode-containing artifacts (228,578 .pyc files, 28,193 source-less). For CPython 3.8–3.14, at least one decompiler emits source for 204,901 of 204,904 files (emission, not verified equivalence). Tools are non-robust: observed and adversarial bytecode cause managed-code exceptions, timeouts, and native process failures (17 robustness signatures). Fuzzing yields 1,009 stack-deduplicated findings, with 261 groups showing potential memory corruption; 91.7% reach execution beyond documented-unsafe ingestion. No findings reproduce from source, showing bytecode can behave differently from source.

arXiv ·
· August 13, 2026