https://seclists.org/oss-sec/2026/q4/530: CPython sandbox escape
Published Nov 5, 2026
·Updated
Affected Software
1 affected component
Python Software Foundation CPython
No. CPython's stated position is that it does not support sandboxing untrusted Python code as a security boundary, and that escapes should be reported to the sandbox's developers.
The report says it abuses CPython's handling of generic types and uses objects made available in every template, including empty sandbox contexts. A sandbox that exposes such objects to untrusted template code may therefore be relevant.
A fix was submitted to the CPython project as pull request 155761. The report states that upstream is not backporting it to security releases.