Pydantic AI Harness before 0.59.0 CodeMode Tool Call Limit Bypass via run_code
CVE-2026-114386Published 21 Oct 2026, 12:39 UTC
Real-world risk
1.1/ 10Low
Routine
If the vulnerable configuration applies to you: 2.6
PreliminaryFrom the CVSS vector only · confidence low
CVSS
6.3
scored by the vendor (CNA), CVSS 4.0
In plain words
No plain-language summary yet. The original description is below.
Original description (from VulnCheck)
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.
Am I affected?
| Product | Affected versions (from the sources) | Fixed in |
|---|---|---|
| pydantic-ai-harnessNiche | < 0.59.0 | 0.59.0 |
What to do
Update to a fixed version: 0.59.0.
Why this score
| Factor | Value | Evidence | × |
|---|---|---|---|
| Impact | MinorReflected XSS, CSRF with low effect, open redirect, minor leak | From the CVSS vector | 0.30 |
| Attacker position | InternetAnyone on the Internet can reach a typical deployment | From the CVSS vector | 1.00 |
| Privileges needed | NoneNo account | From the CVSS vector | 1.00 |
| Victim interaction | NoneNothing | From the CVSS vector | 1.00 |
| Configuration | UncommonNeeds a non-default feature that a minority enables | From the CVSS vector | 0.45 |
| Reliability | ReliableDeterministic: injection, logic bug, path traversal | From the CVSS vector | 1.00 |
Threat level T1: Nothing known (× 0.85)
The default for a new disclosure
EPSS 0.3% chance of exploitation in 30 days (percentile 30), as of 2026-12-02.
The arithmetic
- Prerequisites multiplied together0.450
- Threat T1: Nothing known0.850
- 10 × impact 0.3 × prerequisites 0.45 × threat 0.851.147
- Rounded to one decimal between 0.1 and 101.1
Exploitation and evidence timeline
- 21 Oct 2026 Published
- 3 Dec 2026 Risk 1.1 (cvss fallback)
Weakness
CWE-770
References
- https://github.com/pydantic/pydantic-ai/pull/10362issue-tracking, patch
- https://github.com/pydantic/pydantic-ai/commit/eb27b2b89fe76ae23ee9b6fc9eb4b227a4967949patch
- https://github.com/pydantic/pydantic-ai/releases/tag/v2.59.0release-notes
- https://github.com/pydantic/pydantic-ai/blob/v2.58.0/src/pydantic_ai_harness/pydantic_ai_harness/code_mode/_toolset.py#L642-L680technical-description
- https://pypi.org/project/pydantic-ai-harness/0.59.0/product
- https://www.vulncheck.com/advisories/pydantic-ai-harness-before-0.59.0-codemode-tool-call-limit-bypass-via-run-codethird-party-advisory
- CVE-2026-114386 on CVE.org