CVE-2026-107287: Pydantic AI Excessive Resource Consumption Due to Nested HTML Conversion

pydantic-ai Updated 09 Oct 2026

Summary

08/10/2026
Yes i
Moderate
6.5

CVE-2026-107287: Pydantic AI: Excessive resource use when local web fetching converts nested HTML. Affects pydantic-ai across 2 version ranges.

>= 1.77.0, < 1.107.7 >= 2.0.0b1, < 2.52.0

Fixed in 1.107.7 or 2.52.0, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2026-107287 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Pydantic AI is a Python library designed for data validation and settings management using Python type annotations. It provides tools for parsing and validating data structures, making it easier for developers to work with complex data. However, a recent vulnerability has been identified that affects its local web-fetching capabilities, particularly when handling nested HTML content.

Vulnerability Detail

The vulnerability arises from the way Pydantic AI processes nested block elements during HTML-to-Markdown conversion. When an application fetches attacker-controlled HTML, the conversion process can lead to excessive CPU and memory usage due to the reprocessing of accumulated text at each nested level. This can significantly degrade application performance and may lead to denial of service conditions. The issue is exacerbated in current releases where conversion occurs in a worker thread, consuming substantial resources and delaying other operations.

How To Fix

Latest published version: 2.60.0 as of 23 Oct 2026

pip install --upgrade "pydantic-ai==2.60.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.77.0, < 1.107.7 1.107.7
    pip install --upgrade "pydantic-ai==1.107.7"
  • >= 2.0.0b1, < 2.52.0 2.52.0
    pip install --upgrade "pydantic-ai==2.52.0"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

If upgrading is not immediately feasible, avoid using local web fetching for any HTML content that could be controlled by an attacker. This will help mitigate the risk of excessive resource consumption.

Conclusion

In summary, the vulnerability identified as CVE-2026-107287 in Pydantic AI poses a risk of excessive resource consumption when processing nested HTML. Users are advised to upgrade to the latest patched versions or implement workarounds to safeguard their applications.

See every vulnerability recorded for pydantic-ai →

Share this vulnerability

FAQ

The vulnerability involves excessive CPU and memory usage when converting nested HTML content fetched from potentially malicious sources.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor and alert for open-source vulnerabilities without requiring any signup.

Failure to address this vulnerability can lead to significant performance degradation and potential denial of service, as the application may become unresponsive due to excessive resource consumption.

Yes, the CVSS score for this vulnerability is 6.5, indicating a moderate severity level.

If an upgrade is not possible, refrain from using local web fetching for any HTML content that may be controlled by an attacker to mitigate risks.

Related vulnerabilities

Recent vulnerabilities recorded for pydantic-ai.

How To Fix

Latest published version: 2.60.0 as of 23 Oct 2026

pip install --upgrade "pydantic-ai==2.60.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.77.0, < 1.107.7 1.107.7
    pip install --upgrade "pydantic-ai==1.107.7"
  • >= 2.0.0b1, < 2.52.0 2.52.0
    pip install --upgrade "pydantic-ai==2.52.0"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback