Intel

AIKIDO-2026-631787

pydantic-ai-slim is vulnerable to Uncontrolled Resource Consumption

Uncontrolled Resource ConsumptionGHSA-v36g-jcw9-x7cw Published 6 days ago

65

Medium Risk

This Affects:

PYTHONpydantic-ai-slim
1.77.0 - 1.107.6
Fixed in 1.107.7
2.0.0 - 2.51.0
Fixed in 2.52.0
Are you affected? Scan for Free

TL;DR

The local web_fetch tool converts fetched HTML to Markdown by processing nested block elements and reprocessing each descendant's accumulated text at every level, so a small page with deep nesting such as repeated blockquotes, list items, or definition items expands into a very large intermediate string. Fetching untrusted HTML with this structure consumes excessive CPU and memory and stalls other work in the process, and on older releases the conversion ran directly on the event loop, leading to denial of service. The response body limit only bounds downloaded bytes and the returned content limit applies after conversion, so neither bounds the cost of the conversion itself. The fix adds conversion cost, text scan, and nesting depth limits that abort the conversion once the work budgets are exceeded.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the local web_fetch tool to convert untrusted HTML pages to Markdown.

Background info

pydantic-ai-slim is vulnerable to Uncontrolled Resource Consumption in versions 1.77.0 - 1.107.6 and 2.0.0 - 2.51.0.

How to fix this

Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform