Skip to content

← Actionable
Medium, CVSS 6.5amended

Pydantic AI: Event loop blocked by quadratic title extraction in web_fetch

CVE-2026-107290GHSA-fpf4-vwcp-v4hp

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (pydantic-ai 2.44.0, 1.107.6; pydantic-ai-slim 2.44.0, 1.107.6), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI pydantic-ai

    Affected
    >= 1.77.0, < 1.107.6>= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.6, 2.44.0
  • PyPI pydantic-ai-slim

    Affected
    >= 1.77.0, < 1.107.6>= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.6, 2.44.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.5 · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
  • CVE-2026-107290: 0.51% estimated exploitation activity in the next 30 days; percentile 43.71 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary 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. An application that exposes this tool to untrusted prompts can be steered to fetch an attacker-controlled page of a megabyte or two that blocks the event loop for minutes, stalling every other coroutine in the process — other agent runs, other requests being served — for the duration. This is an availability issue only. SSRF protections and the download size limit introduced in GHSA-v2xh-2vp8-57h8 are unaffected; that limit bounds how much is downloaded, not how long the response takes to process. Details Title extraction used a backtracking pattern over the raw…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 3 · amended ·

    Amended from ghsa record GHSA-fpf4-vwcp-v4hp

  2. Revision 2 · amended ·

    Amended from osv record GHSA-fpf4-vwcp-v4hp

  3. Revision 1 · created ·

    Published from ghsa record GHSA-fpf4-vwcp-v4hp

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-107290

Advisory: Pydantic AI: Event loop blocked by quadratic title extraction in `web_fetch`
IDs: CVE-2026-107290, GHSA-fpf4-vwcp-v4hp
Record: https://patchnext.com/advisories/cve-2026-107290 (revision 3, source checked 26 Oct 2026, 13:55 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.5)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: pydantic-ai 2.44.0, 1.107.6; pydantic-ai-slim 2.44.0, 1.107.6. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI pydantic-ai: affected >= 1.77.0, < 1.107.6; >= 2.0.0b1, < 2.44.0; fixed in 1.107.6, 2.44.0
- PyPI pydantic-ai-slim: affected >= 1.77.0, < 1.107.6; >= 2.0.0b1, < 2.44.0; fixed in 1.107.6, 2.44.0

## Suggested inspection (read-only)
- `python -m pip show pydantic-ai`: prints the installed version. Run with the environment that serves production active.
- `python -m pip show pydantic-ai-slim`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on pydantic-ai, pydantic-ai-slim.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-fpf4-vwcp-v4hp (GitHub-reviewed advisory GHSA-fpf4-vwcp-v4hp lists affected ranges: PyPI pydantic-ai >=1.77.0 =2.0.0b1 =1.77.0 =2.0.0b1 <2.44.0)
- Verified: https://osv.dev/vulnerability/GHSA-fpf4-vwcp-v4hp (OSV record GHSA-fpf4-vwcp-v4hp lists affected ranges: PyPI pydantic-ai >=1.77.0 =2.0.0b1 =1.77.0 =2.0.0b1 <2.44.0 (fixed))

Commands are suggestions: review each one before running it.

Loading voting…