{"id":"CVE-2026-107287","aliases":["GHSA-v36g-jcw9-x7cw","PYSEC-2026-4281","PYSEC-2026-4290"],"url":"https://o3.security/vulnerability/CVE-2026-107287","summary":"Pydantic AI: Excessive resource use when local web fetching converts nested HTML","details":"### Summary\n\nApplications 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.\n\n### Details\n\nNested 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.\n\n### Mitigation\n\nUpgrade 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.","published":"2026-10-08T15:15:05.417Z","modified":"2026-10-21T02:30:46.523430058Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"PyPI","name":"pydantic-ai","fixedVersion":"1.107.7"},{"ecosystem":"PyPI","name":"pydantic-ai","fixedVersion":"2.52.0"},{"ecosystem":"PyPI","name":"pydantic-ai-slim","fixedVersion":"1.107.7"},{"ecosystem":"PyPI","name":"pydantic-ai-slim","fixedVersion":"2.52.0"}],"fix":{"url":"https://github.com/pydantic/pydantic-ai/commit/2b247add4950bef61d352e7ca8aefbd20539180c","label":"pydantic/pydantic-ai@2b247ad"},"references":[{"type":"WEB","url":"https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.7"},{"type":"WEB","url":"https://github.com/pydantic/pydantic-ai/releases/tag/v2.52.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107287.json"},{"type":"ADVISORY","url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-v36g-jcw9-x7cw"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107287"},{"type":"FIX","url":"https://github.com/pydantic/pydantic-ai/commit/2b247add4950bef61d352e7ca8aefbd20539180c"},{"type":"FIX","url":"https://github.com/pydantic/pydantic-ai/commit/2fd38792693da00a3ca5412aeffb436787af3545"},{"type":"FIX","url":"https://github.com/pydantic/pydantic-ai/pull/8984"},{"type":"FIX","url":"https://github.com/pydantic/pydantic-ai/pull/8985"},{"type":"PACKAGE","url":"https://github.com/pydantic/pydantic-ai"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-21T02:30:46.523430058Z"}}