Pydantic AI server-side request forgery in message history reload
- Exploited
- No known exploitation
- Fix
- See vendor advisory
- Who is exposed
- Not reported
Summary
The pydantic-ai and pydantic-ai-slim packages rebuild tool result data that looks like a file as a real file download or provider file reference when saved message history is reloaded. A remote attacker who controls data returned by a tool, such as from an MCP server or an external system, can make the application fetch a URL on its local network, or make the model provider read an s3:// object or uploaded file using the application's credentials, without logging in.
Written by a model
Original description
When message history is serialized and loaded again, a tool result that contains a JSON object in the serialized shape of one of Pydantic AI's file types is rebuilt as that file. A third party who controls data a tool returns, such as a record that an MCP server or a function tool returns from an external system, can use this to make the application download a URL on its local network, or make the model provider read an s3:// object or uploaded file with the application's credentials. Applications are affected when tool results can contain third-party data, message history containing those results is serialized and loaded again (stored history, history a UI adapter holds on the server, or Temporal, DBOS or Prefect durable execution), and the model is one Pydantic AI downloads files for, one that honors force_download, or one whose provider resolves non-HTTP file URLs or uploaded files. History that a client submits through the Vercel AI or AG-UI adapter in the default mode is not affected. The issue is fixed in pydantic-ai and pydantic-ai-slim 1.107.10 and 2.66.0.
What to do
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-133505 (Tool result data shaped like a file is rebuilt as a file download or provider file reference when message history is reloaded), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-133505 (entry last updated 2026-11-20):
Affected:
- PyPI package pydantic-ai: from 1.50.0, through 1.107.9
- PyPI package pydantic-ai: from 2.0.0b1, through 2.65.0
- PyPI package pydantic-ai-slim: from 1.50.0, through 1.107.9
- PyPI package pydantic-ai-slim: from 2.0.0b1, through 2.65.0
Fixed versions: none listed yet.
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
CISA KEV: CVE-2026-133505 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-133505 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Packages (PyPI): find every lockfile in each project and run the stack.check operation of the cve.now MCP server (execute) on each one. Compare the resolved versions, not the ranges a manifest declares, with the affected versions above. Include transitive dependencies.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-4cj4-hgwf-4hc4
- https://pydantic.dev/docs/ai/ui/overview/#trust-model-for-client-submitted-messages
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-133505
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-133505"}.Affected versions
- pydantic-aiFrom 1.50.0 · through 1.107.9Fixed in 2.66.0 (released Nov 4, 2026, 16 days before disclosure), the first release outside every affected range (no listed fixed version clears them all).The latest release, 2.68.0, is not affected.
- pydantic-aiFrom 2.0.0b1 · through 2.65.0
- pydantic-ai-slimFrom 1.50.0 · through 1.107.9Fixed in 2.66.0 (released Nov 4, 2026, 16 days before disclosure), the first release outside every affected range (no listed fixed version clears them all).The latest release, 2.71.0, is not affected.
- pydantic-ai-slimFrom 2.0.0b1 · through 2.65.0
cve.now Index
- Exploitation0/40No signal
- Exposure17/25No login or user action needed per the CVSS vector, reachable over the network without a login · Unknown: No advisory context yet
- Reach16/20pydantic-ai: 1.5M downloads a week
- Severity5.9/10CVSS 5.9
- No patch5/5No fixed version listed; see vendor advisory
What would change the score
- Would score about 89 if added to CISA KEV
- Would score about 84 if CISA's SSVC rates exploitation active
- Would score about 49 if advisories confirm default setups are exposed
Impact
- Widely usedpydantic-ai has 1.5m weekly downloads. pypistats.org
Timeline
- CVE published
- First seen by cve.now
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: partial
- Record last updated
Evidence 4
| Kind | Source |
|---|---|
| Vendor advisory 2Establishes: Affected and fixed versions. | |
| Advisory | GitHub · pydantic/pydantic-ai · Advisory GHSA-4cj4-hgwf-4hc4 |
| Link | pydantic.dev · docs/ai/ui/overview#trust-model-for-client-submitted-messages |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-133505 |
| Record | NVD · CVE-2026-133505 |
Questions about CVE-2026-133505
Is CVE-2026-133505 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
Which versions are affected by CVE-2026-133505?
pydantic-ai (PyPI): from 1.50.0 through 1.107.9. pydantic-ai (PyPI): from 2.0.0b1 through 2.65.0. pydantic-ai-slim (PyPI): from 1.50.0 through 1.107.9. pydantic-ai-slim (PyPI): from 2.0.0b1 through 2.65.0.
Source: cve.now feed data
Related
- CVE-2026-25580Pydantic AI Affected by Server-Side Request Forgery (SSRF) in URL Download Handling
- CVE-2026-107295`pydantic-ai-slim` web UI `/api/chat` accepts browser-simple cross-origin requests that can trigger agent tool execution
- CVE-2026-107286Pydantic AI: Concurrency-limited models can keep their slot when a streamed request ends early
- CVE-2026-25640Pydantic AI affected by Stored XSS via Path Traversal in Web UI CDN URL
- CVE-2026-107289Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifier (incomplete fix for CVE-2026-46678 and CVE-2026-48782)
- CVE-2026-54249VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection
No corrections so far. Something wrong on this page? Report an error.