CVE-2026-57120: PraisonAI: sandbox bypass leaks agent internals

MEDIUM
Published September 14, 2026
CISO Take

A flaw in PraisonAI's multi-agent execute_code sandbox lets prompt-influenced code bypass the framework's attribute blocklist by routing through str.format/str.format_map, which resolve dotted attribute chains via C-level access that the _safe_getattr filter never inspects. This gives an attacker a read primitive into class hierarchies, base classes, qualified names, and object/global dictionaries — potentially exposing secrets, config, or internal state held in the agent process, though it stops short of a full remote code execution chain. There's no CISA KEV listing, no EPSS score, and no public exploit or scanner template, so this isn't under active exploitation; the practical risk hinges entirely on whether your deployment runs execute_code with automatic approval on a network-reachable agent. Patch to praisonaiagents 1.6.59 or later, and in the interim require human approval for any code-execution tool invocation rather than auto-granting it. If you can't patch immediately, audit agent logs for format-string payloads referencing __class__, __globals__, or __dict__ as a detection signal.

Sources: NVD GitHub Advisory ATLAS

What is the risk?

Medium risk (CVSS 6.5, confidentiality-only impact — C:H/I:N/A:N). Network-exploitable with low complexity, low privileges, and no user interaction, but the practical blast radius is bounded: the flaw yields an information-disclosure read primitive (class/globals/dict introspection), not a complete in-process execution chain. Exploitability in the wild is currently theoretical — no EPSS score, no CISA KEV entry, no public PoC or Nuclei template exists. Real-world exposure depends heavily on deployment configuration: the sandbox must be reachable via prompt-influenced input AND execute_code approval must be set to automatic (no human-in-the-loop gate) for the read primitive to be attacker-triggerable.

How does the attack unfold?

Prompt Injection
Attacker submits crafted input to a network-facing PraisonAI agent designed to influence the code the agent assembles for execution.
AML.T0051
Tool Invocation
The agent's execute_code tool auto-approves and runs the prompt-influenced code inside its sandbox.
AML.T0053
Sandbox Bypass
A str.format/str.format_map payload with dotted attribute fields resolves __class__, __globals__, and __dict__ via C-level access, bypassing the _safe_getattr blocklist.
AML.T0097
Information Disclosure
Attacker reads class hierarchies, qualified names, and object/global dictionary contents returned in the agent's output, potentially exposing secrets held in process memory.
AML.T0106

What systems are affected?

Package Ecosystem Vulnerable Range Patched
PraisonAI Agents pip No patch
20 dependents 59% patched ~6d to patch Full package profile →

Do you use PraisonAI Agents? You're affected.

How severe is it?

CVSS 3.1
6.5 / 10
EPSS
0.3%
chance of exploitation in 30 days
Higher than 25% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Unchanged
C High
I None
A None

What should I do?

1 step
  1. 1) Upgrade praisonaiagents to >=1.6.59, which fixes the format-string attribute bypass. 2) Until patched, disable automatic approval for the execute_code tool — require explicit human confirmation before sandboxed code runs, especially on agents reachable from untrusted/network input. 3) Where automation must stay on, restrict execute_code availability to internal, non-network-facing agents only. 4) Add detection for format-string patterns referencing __class__, __globals__, __init__, __subclasses__, or __dict__ in agent-generated code or execution logs. 5) Rotate any secrets that were reachable in-process (env vars, config objects) if exposure is suspected, since this bug specifically targets object/global-dict disclosure.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
NIST AI RMF
MEASURE 2.7 - AI system security and resilience are evaluated and documented
OWASP LLM Top 10
LLM06 - Excessive Agency

Frequently Asked Questions

What is CVE-2026-57120?

A flaw in PraisonAI's multi-agent execute_code sandbox lets prompt-influenced code bypass the framework's attribute blocklist by routing through str.format/str.format_map, which resolve dotted attribute chains via C-level access that the _safe_getattr filter never inspects. This gives an attacker a read primitive into class hierarchies, base classes, qualified names, and object/global dictionaries — potentially exposing secrets, config, or internal state held in the agent process, though it stops short of a full remote code execution chain. There's no CISA KEV listing, no EPSS score, and no public exploit or scanner template, so this isn't under active exploitation; the practical risk hinges entirely on whether your deployment runs execute_code with automatic approval on a network-reachable agent. Patch to praisonaiagents 1.6.59 or later, and in the interim require human approval for any code-execution tool invocation rather than auto-granting it. If you can't patch immediately, audit agent logs for format-string payloads referencing __class__, __globals__, or __dict__ as a detection signal.

Is CVE-2026-57120 actively exploited?

No confirmed active exploitation of CVE-2026-57120 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-57120?

1) Upgrade praisonaiagents to >=1.6.59, which fixes the format-string attribute bypass. 2) Until patched, disable automatic approval for the execute_code tool — require explicit human confirmation before sandboxed code runs, especially on agents reachable from untrusted/network input. 3) Where automation must stay on, restrict execute_code availability to internal, non-network-facing agents only. 4) Add detection for format-string patterns referencing __class__, __globals__, __init__, __subclasses__, or __dict__ in agent-generated code or execution logs. 5) Rotate any secrets that were reachable in-process (env vars, config objects) if exposure is suspected, since this bug specifically targets object/global-dict disclosure.

What systems are affected by CVE-2026-57120?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, multi-agent orchestration, sandboxed code execution tools.

What is the CVSS score for CVE-2026-57120?

CVE-2026-57120 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 0.32%.

What is the AI security impact?

Affected AI Architectures

agent frameworksmulti-agent orchestrationsandboxed code execution tools

MITRE ATLAS Techniques

AML.T0051 LLM Prompt Injection
AML.T0053 AI Agent Tool Invocation
AML.T0097 Virtualization/Sandbox Evasion
AML.T0106 Exploitation for Credential Access

Compliance Controls Affected

EU AI Act: Article 15
NIST AI RMF: MEASURE 2.7
OWASP LLM Top 10: LLM06

What are the technical details?

Original Advisory

PraisonAI is a multi-agent teams system. Prior to praisonaiagents 1.6.59, execute_code sandbox mode permits runtime assembly of blocklisted dunder names and allows str.format or str.format_map to resolve dotted fields through C-level attribute access that bypasses _safe_getattr. This exposes class, qualified-name, base-class, globals, and object-dictionary attributes to prompt-influenced code when approval is automatically granted, producing a high-impact read primitive without establishing a complete in-process execution chain. This issue is fixed in praisonaiagents 1.6.59.

Exploitation Scenario

A CISO's organization exposes a PraisonAI-based customer-support agent via a public chat widget, with execute_code configured to auto-approve tool calls for responsiveness. An attacker sends a message that induces the agent to generate Python code containing a crafted str.format call, e.g. something equivalent to '{0.__class__.__init__.__globals__[some_key]}', embedded as a format argument. Because _safe_getattr's blocklist only intercepts direct attribute access and not the C-level resolution str.format performs internally, the payload executes and returns the object's class hierarchy and global namespace contents in the agent's response — leaking API keys or internal configuration values the attacker then uses to pivot into connected systems (e.g. LLM API keys, database credentials cached in memory).

Weaknesses (CWE)

CWE-693 — Protection Mechanism Failure: The product does not use or incorrectly uses a protection mechanism that provides sufficient defense against directed attacks against the product.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Timeline

Published
September 14, 2026
Last Modified
September 16, 2026
First Seen
September 14, 2026

Related Vulnerabilities