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

Read the record on cve.org

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.

ProductVersions
CodeSafe Infinitode>= 0.0.1, < 0.0.5 Affected

Weaknesses

  • CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code
  • CWE-693 Protection Mechanism Failure

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.

© 2026 NVIDIA, the NVIDIA logo, and NVIDIA Inception are trademarks and/or registered trademarks of NVIDIA Corporation in the U.S. and other countries.