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.
Published: 2026-10-21
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: Resource Exhaustion via Tool Call Limit Bypass
Action: Patch
AI Analysis

Impact

Pydantic AI Harness before version 0.59.0 does not enforce the UsageLimits.tool_calls_limit when nested tool calls are generated from the CodeMode run_code tool. The flaw allows a user or injected prompt to trigger run_nested_call() without the usual check_before_tool_call verification, permitting the sandboxed program to issue an unlimited number of calls to costly or side‑effecting tools. This uncontrolled consumption of resources matches CWE‑770 and could lead to denial of service or unintended execution of privileged operations.

Affected Systems

The vulnerability affects any deployment of pydantic's Pydantic AI Harness with a version less than 0.59.0. All releases before the official 0.59.0 tag inherit the flaw, including internal releases that have not been updated to the latest release. The software is available on PyPI (pydantic-ai-harness) and can be installed or upgraded via standard package managers.

Risk and Exploitability

The CVSS score of 6.3 indicates medium severity. EPSS data is not available, so the likelihood of exploitation cannot be quantified, and the vulnerability is not listed in the CISA KEV catalog. The attack vector is inferred to be an attacker who can supply content to the AI harness—such as through authenticated API calls or prompt injection—because the flaw is triggered by crafted input to run_code. Once triggered, the harness can repeatedly dispatch nested calls, leading to excessive resource consumption or privileged tool invocation.

Generated by OpenCVE AI on October 21, 2026 at 18:42 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Pydantic AI Harness package to version 0.59.0 or later, which contains a fix that enforces the tool call limit for nested calls.
  • If an upgrade is not immediately possible, temporarily disable the CodeMode run_code functionality or restrict its use to trusted inputs only to prevent unauthorized nested calls.
  • Implement rate limiting or monitoring on the AI harness' tool execution subsystem to detect and mitigate anomalous volumes of tool calls caused by the bypass.

Generated by OpenCVE AI on October 21, 2026 at 18:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 21 Oct 2026 13:00:00 +0000

Type Values Removed Values Added
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.
Title Pydantic AI Harness before 0.59.0 CodeMode Tool Call Limit Bypass via run_code
Weaknesses CWE-770
References
Metrics cvssV3_1

{'score': 4.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:L'}

cvssV4_0

{'score': 6.3, '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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-10-21T19:55:49.371Z

Reserved: 2026-10-21T11:46:40.374Z

Link: CVE-2026-114386

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-10-21T13:18:28.613

Modified: 2026-10-21T13:18:28.613

Link: CVE-2026-114386

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-21T18:45:07Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling