Intel

AIKIDO-2026-191372

codesafe is vulnerable to Remote code execution

Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Oct 15, 2026
October 15, 2026

90

CVE Score

Critical

Remote code execution

Are you affected? Scan for Free

TL;DR

codesafe's safe_eval() parses a user-supplied expression string with ast and runs an AST check (_check_ast) that only blocks ast.Call nodes whose func is a plain ast.Name not present in an application-supplied allowed_function_calls list, while the evaluation globals (built from the full builtins.__dict__) retained dangerous builtins like exec, eval, compile, and __import__. Because the check does not restrict indirect call targets (e.g., via subscripting __builtins__) and the builtins dictionary itself was not filtered to a safe allowlist, an application that forwards an attacker-influenced expression into safe_eval() could reach those dangerous builtins and achieve arbitrary code execution. The fix limits the builtins dictionary to a safe allowlist and rejects call targets other than an allowlisted name or an explicitly permitted method.

How do I fix this?

Upgrade the codesafe package to version 0.0.5 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you pass untrusted expression strings into the library's safe_eval function for evaluation.

Package

Versions

0.0.1 - 0.0.4

Fixed in 0.0.5

Background info

codesafe is vulnerable to Remote code execution in versions 0.0.1 - 0.0.4.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea