CVE-2026-133467: CodeSafe: safe_eval Sandbox Escape via Indirect Subscript Call

Published Nov 25, 2026
·
Updated

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 safeeval() 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 safeeval() can execute arbitrary Python code with the permissions of the host application. This issue is fixed in version 0.0.5.

Affected Software

1 affected component
pypi/codesafe>=0.0.1<=0.0.4

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade CodeSafe to a version that resolves this vulnerability.

    Fixed in 0.0.5

Event History

Nov 25, 2026
CVE Published
via MITRE·07:21 PM
Data Sourced
via MITRE·07:21 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this vulnerability?

Applications using CodeSafe versions 0.0.1 through 0.0.4 are exposed if they pass attacker-controlled expressions to safe_eval(). The attacker can execute Python code with the permissions of the host application.

2

Does exploitation require authentication or user interaction?

No. The supplied severity vector indicates network-reachable exploitation with low attack complexity, no privileges required, and no user interaction.

3

What should be done to remediate the issue?

Upgrade CodeSafe to version 0.0.5, which fixes the safe_eval() bypass.

4

How can I determine whether my application is affected?

Check whether it uses CodeSafe 0.0.1 through 0.0.4 and whether untrusted input can reach safe_eval(). The vulnerable validation can be bypassed through indirect subscript calls to dangerous built-ins, such as builtins' exec'.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203