arxiv.org · August 2026
Beyond Source: An Empirical Study of Python Bytecode Security Risks
Reading note
Python runtimes execute bytecode directly through .pyc files, compiled-only modules, and marshalled code objects, which opens an inspection-execution gap that source-centric package security misses entirely. Across 1,034,843 PyPI artifacts they found 7,388 containing bytecode, including 28,193 source-less .pyc files local to an artifact. The tooling is not robust either: real and adversarially mutated bytecode drove decompilers into managed exceptions, timeouts, and native process failures. The same shape as the model-format problem one ecosystem over, since what the scanner can read is not what the runtime will execute.