CVE-2026-114386: Pydantic AI Harness before 0.59.0 CodeMode Tool Call Limit Bypass via run_code

Published Oct 21, 2026
·
Updated

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

Affected Software

1 affected component
Pydantic AI Harness<0.59.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Pydantic AI Harness to a version that resolves this vulnerability.

    Fixed in 0.59.0

Event History

Oct 21, 2026
CVE Published
via MITRE·12:39 PM
Data Sourced
via MITRE·12:39 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Deployments using Pydantic AI Harness before 0.59.0 are exposed when they use the CodeMode toolset and rely on UsageLimits.tool_calls_limit to constrain tool invocations. The impact is most relevant where callable tools are costly or have side effects.

2

What does an attacker need to exploit it?

No authentication or user interaction is required according to the supplied vector, but exploitation has high attack complexity. An attacker-controlled user input or prompt-injected content must cause a sandboxed program to invoke tools through run_nested_call() from run_code.

3

Are default tool-call limits sufficient to prevent exploitation?

No, a configured UsageLimits.tool_calls_limit is bypassed for nested calls dispatched through run_code because check_before_tool_call is not enforced on that path. Nested calls can therefore exceed the operator's intended limit.

4

What is the remediation?

Upgrade Pydantic AI Harness to version 0.59.0 or later. The issue affects versions before 0.59.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203