GHSA-v36g-jcw9-x7cw: Medium severity pip/pydantic-ai-slim vulnerability

Published Oct 8, 2026
·
Updated

Summary

Applications using Pydantic AI's local web-fetch tool can experience excessive CPU and memory use when it converts attacker-controlled HTML. An agent must fetch the affected page; provider-native web fetching is not affected.

Details

Nested block elements cause HTML-to-Markdown conversion to reprocess accumulated text at each level and can greatly expand the intermediate output. The response-body limit bounds downloaded bytes, while the returned-content limit is applied only after conversion. On current releases, conversion runs in a worker thread but can still consume substantial resources and delay other work in the process. Older releases performed conversion on the event loop.

Mitigation

Upgrade to a patched release of pydantic-ai or pydantic-ai-slim. If you cannot upgrade yet, avoid using local web fetching for attacker-controlled HTML.

Affected Software

4 affected componentsFixes available
pip/pydantic-ai-slim>=2.0.0b1<2.52.0
2.52.0
pip/pydantic-ai-slim>=1.77.0<1.107.7
1.107.7
pip/pydantic-ai>=2.0.0b1<2.52.0
2.52.0
pip/pydantic-ai>=1.77.0<1.107.7
1.107.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pydantic-ai-slim to a version that resolves this vulnerability.

    Fixed in 2.52.0
  2. Upgrade

    Upgrade pip/pydantic-ai-slim to a version that resolves this vulnerability.

    Fixed in 1.107.7
  3. Upgrade

    Upgrade pip/pydantic-ai to a version that resolves this vulnerability.

    Fixed in 2.52.0
  4. Upgrade

    Upgrade pip/pydantic-ai to a version that resolves this vulnerability.

    Fixed in 1.107.7
  5. Compensating control

    Avoid using Pydantic AI's local web-fetch tool for attacker-controlled HTML until upgrading.

Event History

Oct 8, 2026
Advisory Published
via GitHub·05:40 PM
Data Sourced
via GitHub·05:40 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Applications are exposed when they use Pydantic AI's local web-fetch tool and an agent fetches attacker-controlled HTML. Provider-native web fetching is not affected.

2

What must an attacker do to trigger the resource exhaustion?

An attacker needs to cause the agent to fetch a crafted HTML page containing deeply nested block elements. The HTML-to-Markdown conversion repeatedly processes accumulated text, which can greatly expand intermediate output and consume CPU and memory.

3

Do response or returned-content limits prevent exploitation?

Not necessarily. The response-body limit applies to downloaded bytes, while the returned-content limit is enforced only after HTML-to-Markdown conversion has already occurred.

4

What can be done before a patched release is deployed?

Avoid local web fetching for attacker-controlled HTML. Upgrading pydantic-ai or pydantic-ai-slim to a patched release is the recommended mitigation.

5

How can the operational impact differ between releases?

Current releases perform conversion in a worker thread, but it can still consume substantial process resources and delay other work. Older releases performed conversion on the event loop.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203