Inefficient Algorithmic Complexity Affecting pydantic-ai-slim package, versions [2.0.0b1,2.52.0)[1.77.0,1.107.7)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.28% (19th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYDANTICAISLIM-20849011
  • published13 Oct 2026
  • disclosed8 Oct 2026
  • creditSounLabs

Introduced: 8 Oct 2026

NewCVE-2026-107287  (opens in a new tab)
CWE-407  (opens in a new tab)

How to fix?

Upgrade pydantic-ai-slim to version 2.52.0, 1.107.7 or higher.

Overview

pydantic-ai-slim is an Agent Framework / shim to use Pydantic with LLMs, slim package

Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the _convert_html function in web_fetch.py, where processing a deeply nested or adversarially structured HTML document causes unbounded HTML-to-Markdown conversion cost. An attacker who controls a web page fetched via the web_fetch tool can serve HTML with deeply nested elements (such as <dd> or list items) that cause the markdownify-based converter to produce enormous intermediate strings, holding the GIL for seconds and crashing the process.

CVSS Base Scores

version 4.0
version 3.1