All stories
Pydantic AI web_fetch advisory Ecosystem Source-backed

One hostile page can stall other agent work: Pydantic AI ships web_fetch fixes

A High-severity advisory says attacker-influenced HTML can tie up shared conversion workers or exhaust process memory. Both pydantic-ai packages have patches on the 1.x and 2.x lines.

Sources (2)

Why now Pydantic AI published GHSA-4whf-38hw-pxxh on October 21 with concrete affected ranges and fixed versions. The linked v2.59.0 release is labeled October 20; the advisory date is a separate event.

Pydantic AI has patched a web-fetching weakness that can let an attacker-chosen HTML page delay unrelated work in the same process or exhaust its memory. The October 21 advisory applies to applications using web_fetch_tool on HTML whose contents an attacker can influence. It does not mean every Pydantic AI application is exposed.

The fix is available for both pydantic-ai and pydantic-ai-slim. Applications on the 1.x line should move to 1.107.9 or a later 1.x release; those on 2.x should use 2.59.0 or a later 2.x release. The stated vulnerable ranges are >=1.77.0, <1.107.9 and >=2.0.0, <2.59.0.

Why one fetch can affect other tasks

The advisory describes HTML conversion occupying a worker for an extended period when a page contains many elements. Concurrent fetches can fill the shared worker pool and delay operations unrelated to the hostile page. Earlier affected versions performed conversion on the event loop, creating another route to blocking work.

Very large HTML tags introduce a second problem: conversion can use many times the original page’s size in memory, potentially exhausting the process. The vulnerable behavior is in processing fetched content, rather than a new model capability or a provider outage.

GitHub rates the advisory High, with a CVSS 3.1 score of 7.5. That severity assumes a deployment where unauthenticated users can prompt an agent with the fetching tool and choose the target URL. Operators should evaluate whether their own application exposes that path. Until an upgrade is possible, the documented mitigation is to avoid fetching attacker-controlled HTML with the tool.

A patch advisory, not an exploitation report

The advisory identifies an availability risk. It does not report credential theft, remote code execution or observed exploitation, and listed no known CVE when reviewed. GitHub also labels the report as submitted with AI assistance; the published maintainer advisory and release notes establish the affected versions and remediation, rather than an AITrending exploit test.

The linked v2.59.0 release carries an October 20 date in its title, while GitHub shows its publication on October 21. Those dates should not be replaced with this article’s October 22 review date. For agent operators, the immediate action is to check the installed package and major version, then apply the matching patch wherever untrusted HTML can reach web_fetch_tool.