CodeSafe: safe_eval Sandbox Escape via Indirect Subscript Call
- State
- Published
- Severity
- 9.8 Critical
- Published
- Nov 25, 2026
- Updated
- Nov 30, 2026
- Reserved
- Nov 19, 2026
Description
CodeSafe is an open-source Python library for code encryption, decryption, and safe evaluation using Python's AST module. From versions 0.0.1 through 0.0.4, the safe_eval() function can be bypassed with indirect subscript calls such as builtins'exec', because AST validation blocks only direct calls to dangerous built-ins. An attacker who controls an expression passed to safe_eval() can execute arbitrary Python code with the permissions of the host application. This issue is fixed in version 0.0.5.
| Product | Versions |
|---|---|
| CodeSafe Infinitode | >= 0.0.1, < 0.0.5 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 9.8 Critical | GitHub_M |
Weaknesses
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.