External risk intelligence

CodeSafe bypass allows arbitrary code execution via indirect calls.

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2026-133467

CodeSafe is a developer-focused Python library designed for code evaluation within host applications. It is not a standalone network-facing service or appliance. Vulnerabilities in such libraries are only reachable if a developer explicitly integrates the library into an internet-exposed application and passes untrusted user input to the affected function, which is not a default or common deployment pattern.

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A vulnerability exists in the CodeSafe Python library that could allow an attacker to execute arbitrary code within an application if the library is integrated and used in a specific way. This occurs because the library's code evaluation function can be bypassed, potentially leading to unauthorized code execution with the host application's privileges.

  • Library bypass allows arbitrary code execution.
  • Could impact applications using this code library.
  • Confirm relevance and exposure within our environment.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by crafting an expression that bypasses the library's validation to execute arbitrary Python code. This is possible because the validation in the `safe_eval()` function only blocks direct calls to dangerous built-in functions.

  • No prior access required.
  • Bypass validation with indirect calls.
  • Arbitrary code execution.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, an attacker who controls an expression passed to `safe_eval()` could execute arbitrary Python code with the permissions of the host application. This could lead to the compromise of the host application's integrity and access to its resources.

  • Host application code.
  • Controlling input to `safe_eval()`.
  • Arbitrary code execution.

Operational Fix

Recommended remediation, mitigation, and detection steps

Determine which teams own applications using the CodeSafe Python library and prioritize identifying instances that are externally facing or handle sensitive data. Once located, confirm the accountable owner and assess the business criticality to inform a risk-based remediation plan.

  • App owners and platform teams are responsible.
  • Verify external reachability and data sensitivity.
  • Plan remediation with vendor and maintenance windows.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the CodeSafe library used for?

CodeSafe is an open-source Python library designed to help developers safely handle code encryption, decryption, and evaluation. It typically uses Python’s Abstract Syntax Tree (AST) module to analyze and restrict how code is processed, aiming to provide a safer environment when an application needs to evaluate expressions provided by users or external sources.

How does CVE-2026-133467 affect safe_eval()?

This vulnerability, classified as CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code), occurs because the validation logic only checks for direct calls to dangerous functions. An attacker can bypass these safety checks by using indirect subscript calls, such as accessing built-in commands like 'exec' through alternative syntax, which the library fails to block, leading to arbitrary code execution.

Does any input trigger this vulnerability?

No. The flaw is not triggered simply by having the library installed in an environment. It requires a specific precondition where an application developer has integrated the library and actively passes untrusted, attacker-controlled expressions into the safe_eval() function. If an application only uses the library to evaluate trusted or hardcoded expressions, it is not susceptible to this bypass.

Why does Halo Surface Signal categorize this as low risk?

Halo Surface Signal assesses this as very unlikely to be reachable because CodeSafe is a developer library rather than a network-facing service. The vulnerability only becomes relevant if your developers have intentionally built an internet-facing application that accepts and processes external user input through this specific library function.

How do I secure my application against this issue?

First, identify all applications within your environment that utilize the CodeSafe library. Once mapped, update the dependency to version 0.0.5, which contains the necessary logic changes to correctly intercept and block indirect calls. Prioritize these updates for applications that accept input from external users or handle sensitive data.

References