UTC
High

Pydantic AI has Server-Side Request Forgery (SSRF) in URL Download Handling

CVE-2026-25580 · GHSA-2jrp-274c-jhv3 · published 2026-02-06

Severity
High
CVSS score
8.6
Chance of exploitation (EPSS)
0.65%
Fixed in
1.56.0
  • Exploitation No known exploitation
  • Automatable Yes
  • Technical impact Partial
  • CISA SSVC
What it is

A Server-Side Request Forgery (SSRF) vulnerability exists in Pydantic AI's URL download functionality. When applications accept message history from untrusted sources, attackers can include malicious URLs that cause the server to make HTTP requests to internal network resources, potentially accessing internal services or cloud credentials. This vulnerability only affects applications that accept message history from external users, such as those using: Agent.to_web or clai web to serve a chat interface VercelAIAdapter for Vercel AI SDK integration AGUIAdapter or Agent.to_ag_ui for AG-UI protocol integration Custom APIs that accept message history from user input Applications that only use h…

What to do

Upgrade pydantic-ai to 1.56.0 or later, and pydantic-ai-slim to 1.56.0 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.

Upgrade to the patched version or later. The fix adds comprehensive SSRF protection: Blocks private/internal IP addresses by default Always blocks cloud metadata endpoints (even with allow-local) Only allows http:// and https:// protocols Resolves hostnames before requests to prevent DNS rebinding Validates each redirect target

Affected
PackageRegistryAffectedFixed in
pydantic-aiPyPI>= 0.0.26, < 1.56.01.56.0
pydantic-ai-slimPyPI>= 0.0.26, < 1.56.01.56.0

The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].