AI-assisted summary built from NVD and CISA data. Verify against the linked sources before acting.

Summary

CodeSafe’s safe_eval() can be bypassed using indirect subscript calls such as builtins’exec’, because AST validation only blocks direct calls to dangerous built-ins. An attacker controlling the evaluated expression can run arbitrary Python with the host application’s permissions.

Impact: arbitrary code execution

Affected technologies

  • Infinitode CodeSafe 0.0.1 through 0.0.4

Upgrade to the fixed CodeSafe version and avoid passing untrusted input to safe_eval().

Details

   
CVSS 9.8 (Critical)
Vendor / product Infinitode CodeSafe
Published 2026-11-25
Weakness CWE-693, CWE-95
Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Original 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.

References

← Threat intelligence dashboard