{"id":"CVE-2026-107294","aliases":["CVE-2026-107294","GHSA-v2xh-2vp8-57h8","PYSEC-2026-4280","PYSEC-2026-4289"],"related":[],"kind":"vulnerability","state":"published","title":"Pydantic AI: Unbounded memory use when downloading remote content via web_fetch or FileUrl","summary":"Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.77.0 until 1.107.2 and 2.24.0, web_fetch_tool, the WebFetch local fallback, and remote FileUrl media downloads buffer the complete HTTP response body before enforcing content-size controls. An attacker-influenced URL can stream an arbitrarily large response that exhausts process memory and crashes the worker; affected media types include ImageUrl, DocumentUrl, VideoUrl, and AudioUrl. SSRF protections remain effective, and the impact is limited to availability. This issue is fixed in versions 1.107.2 and 2.24.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.77.0 until 1.107.2 and 2.24.0, web_fetch_tool, the WebFetch local fallback, and remote FileUrl media downloads buffer the complete HTTP response body before enforcing content-size controls. An attacker-influenced URL can stream an arbitrarily large response that exhausts process memory and crashes the worker; affected media types include ImageUrl, DocumentUrl, VideoUrl, and AudioUrl. SSRF protections remain effective, and the impact is limited to availability. This issue is fixed in versions 1.107.2 and 2.24.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nSeveral remote-content download paths in Pydantic AI buffered the entire HTTP response body into memory before enforcing any size limit. An application that exposes the local web-fetch tool (`web_fetch_tool`, or the `WebFetch` capability's local fallback) to untrusted prompts can be driven to fetch an attacker-chosen URL that streams a very large body, exhausting process memory and crashing the worker. The same unbounded buffering applied to `FileUrl` media downloads (`ImageUrl`, `DocumentUrl`, `VideoUrl`, `AudioUrl`).\n\nThis is an **availability** issue only. SSRF protections (scheme allowlist, private-IP and cloud-metadata blocking) are unaffected; there is no confidentiality or integrity impact.\n\n### Details\n\nThe download helpers read the full response body before applying content-size controls, so an existing text-length limit only truncated *after* the whole body was already in memory, and media downloads had no wire-level cap at all. A single large response could grow process memory without bound .\n\n### Who Is Affected\n\nYou are affected if your application registers the local web-fetch tool (or relies on the `WebFetch` capability's local fallback) and exposes the agent to untrusted prompts, or if it downloads large remote `FileUrl`s influenced by untrusted input. Applications that only fetch developer-controlled URLs are not exposed to the model-chosen attack path.\n\n### Remediation\n\nUpgrade to `2.24.0` or later (v2) or `1.107.2` or later (v1). Patched versions enforce a default 50 MiB cap on web-fetch and `FileUrl` downloads while streaming; pass `None` to the limit to restore the previous unbounded behavior.\n\n### Credits\n\nIdentified during internal review of media-download hardening.","format":"markdown","source":"ghsa"}],"published":"2026-10-08T16:59:25.246Z","modified":"2026-10-15T14:55:51.016Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-400","CWE-770"],"affected":[{"ranges":[{"version":">= 1.77.0, < 1.107.2","status":"affected"},{"version":">= 2.0.0b1, < 2.24.0","status":"affected"}],"vendor":"pydantic","product":"pydantic-ai","source":"cvelist"},{"ranges":[{"version":">= 1.77.0, < 1.107.2","status":"affected"},{"version":">= 2.0.0b1, < 2.24.0","status":"affected"}],"vendor":"pydantic","product":"pydantic-ai-slim","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.77.0","status":"affected","fixed":"1.107.2"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.24.0"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.77.0","status":"affected","fixed":"1.107.2"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.24.0"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.77.0","fixed":"1.107.2"},{"status":"affected","introduced":"2.0.0","fixed":"2.24.0"}],"vendor":"pydantic","product":"pydantic_ai","cpe":"cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"1.77.0","status":"affected","fixed":"1.107.2"},{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.24.0"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"1.77.0","status":"affected","fixed":"1.107.2"},{"type":"ecosystem","introduced":"2.0.0b1","status":"affected","fixed":"2.24.0"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"pysec"}],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-v2xh-2vp8-57h8","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/7141","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/7308","tags":["issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/7a64d049c3f5271a975cd1d64b2fa876d83ede1d","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/e3824a58c82864ed26afb2887619834a4eb86cc8","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.2","tags":["patch","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v2.24.0","tags":["patch","release-notes","vendor-advisory","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pydantic-ai","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-v2xh-2vp8-57h8","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107294","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/pydantic-ai-slim","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-08T20:23:19.119Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-107294","url":"https://www.cve.org/CVERecord?id=CVE-2026-107294","licence":"CVE Terms of Use","modified":"2026-10-09T15:15:18.765Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v2xh-2vp8-57h8","url":"https://github.com/advisories/GHSA-v2xh-2vp8-57h8","licence":"CC-BY-4.0","modified":"2026-10-15T14:55:51.016Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-107294","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-107294","licence":"Public domain","modified":"2026-10-13T13:49:02.473Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4280","url":"https://osv.dev/vulnerability/PYSEC-2026-4280","licence":"CC-BY-4.0","modified":"2026-10-15T14:55:51.016Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4289","url":"https://osv.dev/vulnerability/PYSEC-2026-4289","licence":"CC-BY-4.0","modified":"2026-10-15T14:55:51.016Z"}],"updatedAt":"2026-11-25T22:59:43.189Z","epss":{"score":0.00437,"percentile":0.39728,"date":"2026-12-01T12:00:22.000Z"}}