Pydantic AI: Event loop blocked by quadratic title extraction in `web_fetch`
CVE-2026-107290 · GHSA-fpf4-vwcp-v4hp · published 2026-10-08
- Severity
- Medium
- CVSS score
- 6.5
- Chance of exploitation (EPSS)
- 0.51%
- Fixed in
- 2.44.0
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
The local web-fetch tool (webfetchtool, also used as the WebFetch capability's local fallback) processed responses with several steps whose running time grows quadratically with the size of certain server-controlled inputs, and ran them on the event loop: decoding the body with whichever charset the server declared, extracting the page title with a backtracking regular expression, and converting the HTML to markdown.
Upgrade pydantic-ai to 2.44.0 or later, and pydantic-ai-slim to 2.44.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
Upgrade to a patched version. The title is now found with a single linear scan, the conversion steps above run in linear time, and decoding, title extraction and conversion all run in a worker thread. A charset naming a codec that isn't a text encoding, and a page too deeply nested to convert, are reported back to the model as a failed fetch instead of aborting the run; a JSON body too deeply nested to parse is returned as plain text.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| pydantic-ai | PyPI | >= 1.77.0, < 1.107.6 | 1.107.6 |
| pydantic-ai | PyPI | >= 2.0.0b1, < 2.44.0 | 2.44.0 |
| pydantic-ai-slim | PyPI | >= 1.77.0, < 1.107.6 | 1.107.6 |
| pydantic-ai-slim | PyPI | >= 2.0.0b1, < 2.44.0 | 2.44.0 |
- HightsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS@tsparticles/mcp-server
- HighMissing request-wide media budget allows single-request frontend resource exhaustionvllm
- HighMCP TypeScript SDK: HTTP server transports and handlers did not limit request body size or JSON-RPC batch length@modelcontextprotocol/hono, @modelcontextprotocol/node, @modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighvLLM : DoS via unvalidated mm_processor_kwargs in multimodal image processors (Isaac, InternVL, H2OVL, etc.)vllm
- HighMCP TypeScript SDK: One HTTP request within the default size limit could exhaust server memory during validation@modelcontextprotocol/sdk, @modelcontextprotocol/server
- HighFrame-count cap bypass in VideoMediaIO.load_base64 for video/jpeg via media_io_kwargs.video.num_framesvllm
- HighPydantic AI: Concurrency-limited models can keep their slot when a streamed request ends earlypydantic-ai, pydantic-ai-slim
- HighPydantic AI Web chat UI (`Agent.to_web()`, `clai web`): a website visited by the developer can trigger agent runs and server-side tool execupydantic-ai, pydantic-ai, pydantic-ai-slim, pydantic-ai-slim
- HighPydantic AI has Server-Side Request Forgery (SSRF) in URL Download Handlingpydantic-ai, pydantic-ai-slim
- HighPydantic AI has Stored XSS via Path Traversal in Web UI CDN URLpydantic-ai, pydantic-ai-slim
- MediumPydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` headerpydantic-ai, pydantic-ai, pydantic-ai-slim, pydantic-ai-slim
- MediumPydantic AI: Unbounded memory use when downloading remote content via web_fetch or FileUrlpydantic-ai, pydantic-ai, pydantic-ai-slim, pydantic-ai-slim
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.