Description
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.77.0 until 1.107.7 and 2.52.0, the local web_fetch_tool and the WebFetch local fallback can consume excessive CPU and memory during HTML-to-Markdown conversion of attacker-controlled HTML containing deeply nested block elements. Conversion repeatedly reprocesses accumulated text and can greatly expand intermediate output before the returned-content limit is applied, allowing a model-directed fetch to delay other work in the process. Provider-native web fetching is not affected. This issue is fixed in versions 1.107.7 and 2.52.0.
Published: 2026-10-08
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Denial of Service via resource exhaustion
Action: Patch
AI Analysis

Impact

An attacker can supply deeply nested HTML to Pydantic AI’s local web_fetch_tool or its fallback, causing the library to repeatedly reprocess already accumulated text during HTML‑to‑Markdown conversion. This manipulation can exponentially increase intermediate output volume before the model’s returned‑content limit is applied, leading to excessive CPU and memory use. The impact is a denial‑of‑service for the process running the framework. The flaw is a form of Uncontrolled Resource Consumption (CWE‑400) coupled with inefficient looping that resembles a Denial‑of‑Service via resource waste (CWE‑407), and can lead to excessive allocation of resources (CWE‑770).

Affected Systems

The vulnerability affects the Pydantic AI libraries pydantic‑ai and pydantic‑ai‑slim. Versions 1.77.0 through 1.107.6 (inclusive) and any 2.x build prior to 2.52.0 are impacted. Fixed versions are 1.107.7 and 2.52.0 and later releases.

Risk and Exploitability

With a CVSS score of 6.5 the flaw is rated as moderate severity. EPSS data is not available and the issue is not currently catalogued in CISA’s KEV list, indicating limited evidence of widespread exploitation. The likely attack vector involves an attacker who can control the input passed to the local web_fetch_tool or trigger a model‑directed fetch that supplies malicious nested HTML. Because the tool runs in‑process, the attacker can achieve denial of service against the host application without any network interaction, but requires the attacker to deliver the crafted HTML through the application’s fetch interface or by embedding it in a model prompt. The vulnerability’s exploitation does not involve arbitrary code execution or privilege escalation, but it can substantially degrade service availability for the affected process.

Generated by OpenCVE AI on October 9, 2026 at 01:42 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Pydantic AI to version 1.107.7 or later, or 2.52.0 or later, where the bug is fixed.
  • If upgrading is not immediately feasible, disable the local web_fetch_tool and its fallback so no HTML is fetched or converted locally.
  • Consider adding limits on HTML nesting depth or guarding the conversion routine to reject unusually deep structures, and monitor the application for abnormal CPU or memory usage that could indicate exploitation.

Generated by OpenCVE AI on October 9, 2026 at 01:42 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-v36g-jcw9-x7cw Pydantic AI: Excessive resource use when local web fetching converts nested HTML
History

Wed, 14 Oct 2026 01:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 13 Oct 2026 14:45:00 +0000

Type Values Removed Values Added
First Time appeared Pydantic pydantic Ai
CPEs cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:*
cpe:2.3:a:pydantic:pydantic_ai:*:-:*:*:*:python:*:*
Vendors & Products Pydantic pydantic Ai

Fri, 09 Oct 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-770
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 08 Oct 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Pydantic
Pydantic pydantic-ai
Vendors & Products Pydantic
Pydantic pydantic-ai

Thu, 08 Oct 2026 15:45:00 +0000

Type Values Removed Values Added
Description Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.77.0 until 1.107.7 and 2.52.0, the local web_fetch_tool and the WebFetch local fallback can consume excessive CPU and memory during HTML-to-Markdown conversion of attacker-controlled HTML containing deeply nested block elements. Conversion repeatedly reprocesses accumulated text and can greatly expand intermediate output before the returned-content limit is applied, allowing a model-directed fetch to delay other work in the process. Provider-native web fetching is not affected. This issue is fixed in versions 1.107.7 and 2.52.0.
Title Pydantic AI: Excessive resource use when local web fetching converts nested HTML
Weaknesses CWE-400
CWE-407
References
Metrics cvssV3_1

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


Subscriptions

Pydantic Pydantic-ai Pydantic Ai
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-10-14T00:58:57.237Z

Reserved: 2026-10-07T15:53:23.586Z

Link: CVE-2026-107287

cve-icon Vulnrichment

Updated: 2026-10-14T00:58:52.340Z

cve-icon NVD

Status : Analyzed

Published: 2026-10-08T16:17:03.973

Modified: 2026-10-14T01:17:04.887

Link: CVE-2026-107287

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-10-08T15:15:05Z

Links: CVE-2026-107287 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-09T01:45:08Z

Weaknesses
  • CWE-400

    Uncontrolled Resource Consumption

  • CWE-407

    Inefficient Algorithmic Complexity

  • CWE-770

    Allocation of Resources Without Limits or Throttling