CVE-2026-107287
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
6.5
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
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.
- Record
CVE-2026-107287- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
EUVDEUVD-2026-95075
6.5
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.
- Record
EUVD-2026-95075- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-v36g-jcw9-x7cw
6.5
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
Summary
Applications 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.
Details
Nested 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.
Mitigation
Upgrade 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.
- Record
GHSA-v36g-jcw9-x7cw- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
NVD
6.5
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.
- Record
CVE-2026-107287- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
OSV
6.5
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
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.
- Record
CVE-2026-107287- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
OSVGHSA-v36g-jcw9-x7cw
6.5
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
Summary
Applications 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.
Details
Nested 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.
Mitigation
Upgrade 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.
- Record
GHSA-v36g-jcw9-x7cw- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Weakness
- CWE-400, CWE-407
- Updated
- 2026-11-02
OSVPYSEC-2026-4281
6.5
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
Summary
Applications 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.
Details
Nested 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.
Mitigation
Upgrade 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.
- Record
PYSEC-2026-4281- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVPYSEC-2026-4290
6.5
Pydantic AI: Excessive resource use when local web fetching converts nested HTML
Summary
Applications 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.
Details
Nested 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.
Mitigation
Upgrade 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.
- Record
PYSEC-2026-4290- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pydantic-aiPyPI |
1.77.0 up to 1.107.7 | 1.107.7 |
pydantic-aiPyPI |
2.0.0b1 up to 2.52.0 | 2.52.0 |
pydantic-ai-slimPyPI |
1.77.0 up to 1.107.7 | 1.107.7 |
pydantic-ai-slimPyPI |
2.0.0b1 up to 2.52.0 | 2.52.0 |
pydantic-aiPyPI |
1.77.0 up to 1.107.7, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 36 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.107.51.107.61.78.01.79.01.80.01.81.01.82.01.83.01.84.01.84.11.85.01.85.11.86.01.86.11.87.01.88.01.89.01.89.11.90.01.91.01.92.01.93.01.94.01.95.01.95.11.96.01.96.11.97.01.98.01.99.0 |
1.107.7 |
pydantic-aiPyPI |
2.0.0b1 up to 2.52.0, plus listed versions 2.0.02.0.0b22.0.0b32.0.0b42.0.0b5 Show 45 moreShow less2.0.0b62.0.0b72.1.02.10.02.11.02.12.02.13.02.14.02.14.12.15.02.16.02.17.02.18.02.19.02.2.02.20.02.21.02.22.02.23.02.24.02.25.02.26.02.27.02.27.12.28.02.29.02.3.02.30.02.31.02.31.12.32.02.32.12.32.22.33.02.34.02.35.02.35.12.35.32.36.02.37.02.38.02.39.02.4.02.40.02.41.0 |
2.52.0 |
pydantic-ai-slimPyPI |
1.77.0 up to 1.107.7, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 36 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.107.51.107.61.78.01.79.01.80.01.81.01.82.01.83.01.84.01.84.11.85.01.85.11.86.01.86.11.87.01.88.01.89.01.89.11.90.01.91.01.92.01.93.01.94.01.95.01.95.11.96.01.96.11.97.01.98.01.99.0 |
1.107.7 |
pydantic-ai-slimPyPI |
2.0.0b1 up to 2.52.0, plus listed versions 2.0.02.0.0b22.0.0b32.0.0b42.0.0b5 Show 45 moreShow less2.0.0b62.0.0b72.1.02.10.02.11.02.12.02.13.02.14.02.14.12.15.02.16.02.17.02.18.02.19.02.2.02.20.02.21.02.22.02.23.02.24.02.25.02.26.02.27.02.27.12.28.02.29.02.3.02.30.02.31.02.31.12.32.02.32.12.32.22.33.02.34.02.35.02.35.12.35.32.36.02.37.02.38.02.39.02.4.02.40.02.41.0 |
2.52.0 |
pydantic-aiPyPI |
1.77.0 up to 1.107.7, 2.0.0b1 up to 2.52.0, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 45 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.107.51.107.61.78.01.79.01.80.01.81.01.82.01.83.01.84.01.84.11.85.01.85.11.86.01.86.11.87.01.88.01.89.01.89.11.90.01.91.01.92.01.93.01.94.01.95.01.95.11.96.01.96.11.97.01.98.01.99.02.0.02.0.0b22.0.0b32.0.0b42.0.0b52.0.0b62.0.0b72.1.02.10.0 |
1.107.72.52.0 |
pydantic-ai-slimPyPI |
1.77.0 up to 1.107.7, 2.0.0b1 up to 2.52.0, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 45 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.107.51.107.61.78.01.79.01.80.01.81.01.82.01.83.01.84.01.84.11.85.01.85.11.86.01.86.11.87.01.88.01.89.01.89.11.90.01.91.01.92.01.93.01.94.01.95.01.95.11.96.01.96.11.97.01.98.01.99.02.0.02.0.0b22.0.0b32.0.0b42.0.0b52.0.0b62.0.0b72.1.02.10.0 |
1.107.72.52.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-107287 is a medium vulnerability (CVSS 6.5) in Pydantic Ai, published October 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.28%, the 20th percentile. Fixed in pydantic-ai 1.107.7.
References
github.com/pydantic/pydantic-ai/security/advisories/GHSA-v36g-jcw9-x7cw
github.com/pydantic/pydantic-ai/pull/8984
github.com/pydantic/pydantic-ai/pull/8985
github.com/pydantic/pydantic-ai/commit/2b247add4950bef61d352e7ca8aefbd20539180c
github.com/pydantic/pydantic-ai/commit/2fd38792693da00a3ca5412aeffb436787af3545
github.com/pydantic/pydantic-ai/releases/tag/v1.107.7
Show 7 moreShow less
github.com/pydantic/pydantic-ai/releases/tag/v2.52.0
github.com/advisories/GHSA-v36g-jcw9-x7cw
github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107287.json
nvd.nist.gov/vuln/detail/CVE-2026-107287
github.com/pydantic/pydantic-ai
pypi.org/project/pydantic-ai
pypi.org/project/pydantic-ai-slim
Left out here: 150 versions. The JSON record has them.