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

pydantic-ai Updated 15 Oct 2026

Summary

15/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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pydantic AI is a Python library designed for data validation and settings management using Python type annotations. It provides a powerful local web-fetching tool that allows applications to retrieve and process web content. However, this functionality can lead to excessive resource consumption when handling attacker-controlled HTML, particularly when nested block elements are involved.

Vulnerability Detail

The vulnerability arises from the way Pydantic AI processes nested HTML during conversion to Markdown. When an agent fetches a page with nested HTML elements, the conversion process can result in significant CPU and memory usage due to the reprocessing of accumulated text at each level. This can lead to performance degradation and delays in other tasks. The issue is exacerbated in current releases where conversion occurs in a worker thread, consuming substantial resources, while older versions performed this conversion on the event loop.

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 possible, avoid using local web fetching for any HTML content that may be controlled by an attacker. This can help mitigate the risk of excessive resource consumption.

Conclusion

In summary, the vulnerability CVE-2026-107287 in Pydantic AI can lead to excessive resource consumption when processing nested HTML. It is crucial to upgrade to the patched versions or implement workarounds to mitigate the risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for pydantic-ai →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 6.5, indicating a moderate level of risk.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Failure to address this vulnerability can lead to excessive CPU and memory usage, potentially causing application slowdowns and impacting overall performance.

Yes, versions 1.107.7 and 2.52.0 or later are patched and safe to use.

If you cannot upgrade, it is recommended to avoid using local web fetching for HTML content that may be controlled by an attacker.

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