CVE-2026-57120: PraisonAI execute_code sandbox bypass via string format injection

CVE-2026-57120 · Severity: medium · CVSS 6.5 · Published 2026-09-14

PraisonAI is a multi-agent AI system that allows controlled code execution within a sandbox. Prior to version 1.6.59, the sandbox's security controls could be bypassed using Python string formatting methods to access restricted internal attributes, allowing an attacker to read sensitive class metadata and globals without full code execution. This affects organizations using PraisonAI to run agent-based workflows with automatically approved code execution.

Technologies: praisonaiagents (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2026-57120 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-57120 being exploited in the wild.
How severe is CVE-2026-57120?
Medium severity, with a CVSS score of 6.5, published 14 September 2026.
Which products and versions are affected?
praisonaiagents (PyPI) ECOSYSTEM:introduced=0,fixed=1.6.59.
Is there a fix for CVE-2026-57120?
Yes. praisonaiagents (PyPI): upgrade to 1.6.59 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-57120 attacked?
It is attacked over the network.
Am I affected by CVE-2026-57120?
Check whether you run praisonaiagents (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • praisonaiagents (PyPI): upgrade to 1.6.59 or later
    pip install "praisonaiagents>=1.6.59"

Technical details

The vulnerability is an attribute-access bypass in the execute_code sandbox that occurs when str.format or str.format_map methods resolve dotted field names. These methods use C-level attribute access that circumvents the _safe_getattr filter intended to block dunder attributes. An attacker can craft prompt-influenced strings that, when formatted, expose __class__, __qualname__, __bases__, __globals__, and __dict__ attributes. No authentication bypass or full in-process code execution is required; the attack succeeds when code approval is automatically granted. The fix in version 1.6.59 hardens input validation and access controls to prevent this attribute resolution path.

Affected products

  • PraisonAI praisonaiagents prior to 1.6.59

Identifiers

  • CVE-2026-57120
  • GHSA-pv2j-rghr-v5r9
  • PYSEC-2026-3533

Timeline

  • 2026-09-14: disclosed
  • 2026-06-13: patched: Fix committed in version 1.6.59

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.