{"id":"CVE-2026-107287","published":"2026-10-08T15:15:05Z","modified":"2026-10-14T00:58:57Z","title":"Pydantic AI: Excessive resource use when local web fetching converts nested HTML","vendor":"pydantic","product":"pydantic-ai","tier":"tail","description":{"text":"Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.77.0 until 1.107.7 and 2.52.0, the local web_fetch_tool and the WebFetch local fallback can consume excessive CPU and memory during HTML-to-Markdown conversion of attacker-controlled HTML containing deeply nested block elements. Conversion repeatedly reprocesses accumulated text and can greatly expand intermediate output before the returned-content limit is applied, allowing a model-directed fetch to delay other work in the process. Provider-native web fetching is not affected. This issue is fixed in versions 1.107.7 and 2.52.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00519,"percentile":0.37437,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"},{"id":"CWE-407","name":"Inefficient Algorithmic Complexity"}],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-v36g-jcw9-x7cw","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/8984","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/8985","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/2b247add4950bef61d352e7ca8aefbd20539180c","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/2fd38792693da00a3ca5412aeffb436787af3545","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.7","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v2.52.0","tags":["x_refsource_MISC"]}],"priority":{"score":12.0,"factors":[{"name":"EPSS percentile","points":7.49},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"pydantic","affectedVersions":[{"vendor":"pydantic","product":"pydantic-ai","versions":[">= 1.77.0, < 1.107.7",">= 2.0.0b1, < 2.52.0"]},{"vendor":"pydantic","product":"pydantic-ai-slim","versions":[">= 1.77.0, < 1.107.7",">= 2.0.0b1, < 2.52.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-14T00:58:47.200664Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pydantic-ai","vulnerableRanges":[">=1.77.0, <1.107.7",">=2.0.0b1, <2.52.0"],"patched":["1.107.7","2.52.0"],"from":["GHSA-v36g-jcw9-x7cw","PYSEC-2026-4281"],"provenance":"source"},{"ecosystem":"PyPI","package":"pydantic-ai-slim","vulnerableRanges":[">=1.77.0, <1.107.7",">=2.0.0b1, <2.52.0"],"patched":["1.107.7","2.52.0"],"from":["GHSA-v36g-jcw9-x7cw","PYSEC-2026-4290"],"provenance":"source"}],"summary":{"text":"Pydantic AI, the Python agent framework for Generative AI applications, has a flaw in its local web_fetch_tool and WebFetch fallback where HTML-to-Markdown conversion of attacker-controlled pages with deeply nested block elements repeatedly reprocesses accumulated text, consuming excessive CPU and memory. An attacker who can get a model-directed fetch to target a crafted page, without authentication and with user interaction required, can stall the process and delay other work; provider-native web fetching is not affected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:09:40Z"},"euvd":{"id":"EUVD-2026-95075","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pydantic-ai-cve-2026-25580","children":[{"from":"CVE-2026-107287","to":"CVE-2026-107290","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pydantic_ai_slim/pydantic_ai/common_tools/web_fetch.py"],"commits":["https://github.com/pydantic/pydantic-ai/commit/2b247add4950bef61d352e7ca8aefbd20539180c","https://github.com/pydantic/pydantic-ai/commit/2fd38792693da00a3ca5412aeffb436787af3545","https://github.com/pydantic/pydantic-ai/commit/2faa6181d8a17d83bc9516d035c5270db8730fa0","https://github.com/pydantic/pydantic-ai/commit/9cdc952e4c3319e85a3e04f2de49fbbb765bd38b"],"basis":"shared function","functions":["__call__"]}]},{"from":"CVE-2026-107287","to":"CVE-2026-107294","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["pydantic_ai_slim/pydantic_ai/common_tools/web_fetch.py"],"commits":["https://github.com/pydantic/pydantic-ai/commit/2b247add4950bef61d352e7ca8aefbd20539180c","https://github.com/pydantic/pydantic-ai/commit/2fd38792693da00a3ca5412aeffb436787af3545","https://github.com/pydantic/pydantic-ai/commit/7a64d049c3f5271a975cd1d64b2fa876d83ede1d","https://github.com/pydantic/pydantic-ai/commit/e3824a58c82864ed26afb2887619834a4eb86cc8"],"basis":"shared function","functions":["__call__"]}]}],"packageHistory":[{"cve":"CVE-2026-107289","published":"2026-10-08","fixed":"2.44.0","kev":false,"link":{"from":"CVE-2026-107289","to":"CVE-2026-107287","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai","fromFixed":"1.107.6","toFixed":"1.107.7","daysApart":0},{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai","fromFixed":"2.44.0","toFixed":"2.52.0","daysApart":0}]}},{"cve":"CVE-2026-107290","published":"2026-10-08","fixed":"2.44.0","kev":false},{"cve":"CVE-2026-107291","published":"2026-10-08","fixed":"2.44.0","kev":false},{"cve":"CVE-2026-107287","published":"2026-10-08","fixed":"2.52.0","kev":false},{"cve":"CVE-2026-107286","published":"2026-10-08","fixed":"2.53.0","kev":false,"link":{"from":"CVE-2026-107287","to":"CVE-2026-107286","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai","fromFixed":"2.52.0","toFixed":"2.53.0","daysApart":0},{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai-slim","fromFixed":"2.52.0","toFixed":"2.53.0","daysApart":0}]}}],"package":"PyPI:pydantic-ai"}}