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

Source: https://junglewise.ai/threats/cve-2026-57120-praisonai-execute-code-sandbox-bypass-via-string-format-injection  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-14. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/pypi-praisonaiagents). Vendors: [PyPI](https://junglewise.ai/threats/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

  ```sh
  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

- [https://github.com/MervinPraison/PraisonAI/commit/2adfe7e8323f6deec66925cf15a885b6238895e9](https://github.com/MervinPraison/PraisonAI/commit/2adfe7e8323f6deec66925cf15a885b6238895e9)
- [https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.59](https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.59)

## Related threats

- [PraisonAI SearxNG URL validation bypass in search tools](https://junglewise.ai/threats/cve-2026-57143-praisonai-server-side-request-forgery-ssrf-in-searxng-search-web)
- [PraisonAI missing access control in API endpoints](https://junglewise.ai/threats/cve-2026-57118-praisonai-agentteam-launch-exposes-unauthenticated-remote-agent)
- [PraisonAI legacy SSE endpoint CORS and authentication bypass](https://junglewise.ai/threats/cve-2026-57112-praisonai-legacy-sse-endpoint-cors-and-authentication-bypass)
- [PraisonAI IMAP injection in email tools](https://junglewise.ai/threats/cve-2026-57130-praisonai-imap-injection-in-email-tools)
- [PraisonAI path traversal in file mention parsing](https://junglewise.ai/threats/cve-2026-57129-praisonai-path-traversal-in-file-mention-parsing)
