Read the docs
TI-2026-20740 Aliases CVE-2026-25640GHSA-wjp5-868j-wqv7

Pydantic AI affected by Stored XSS via Path Traversal in Web UI CDN URL

Priority LOW 31CWE-22Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Required
Attack complexity
Low
Impact type
Cross-site scripting
Confidentiality · integrity · availability
High · Low · None
Fix status
Partial Red Hat: 1 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.

Summary

Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 to before 1.51.0, a path traversal vulnerability in the Pydantic AI web UI allows an attacker to serve arbitrary JavaScript in the context of the application by crafting a malicious URL. In affected versions, the CDN URL is constructed using a version query parameter from the request URL. This parameter is not validated, allowing path traversal sequences that cause the server to fetch and serve attacker-controlled HTML/JavaScript from an arbitrary source on the same CDN, instead of the legitimate chat UI package. If a victim clicks the link or visits it via an iframe, attacker-controlled code executes in their browser, enabling theft of chat history and other client-side data. This vulnerability only affects applications that use Agent.to_web to serve a chat interface and clai web to serve a chat interface from the CLI. These are typically run locally (on localhost), but may also be deployed on a remote server. This vulnerability is fixed in 1.51.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00371 31st percentileScored 2026-11-07
Fix Partial pydantic-ai (pydantic): 1.51.0pydantic-ai (PyPI): 1.51.0+1 more productRed Hat: 1 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pydanticpydantic-ai1.34.0 to before 1.51.01.51.0Patch availableCNA
—pydantic-ai (PyPI)1.34.0 to before 1.51.01.51.0Patch availableGHSA-wjp5-868j-wqv7
—pydantic-ai-slim (PyPI)1.34.0 to before 1.51.01.51.0Patch availableGHSA-wjp5-868j-wqv7
  • pydantic-ai Vendorpydantic Affected 1.34.0 to before 1.51.0 Fixed in 1.51.0 Patch available CNA
  • pydantic-ai (PyPI) Vendor— Affected 1.34.0 to before 1.51.0 Fixed in 1.51.0 Patch available GHSA-wjp5-868j-wqv7
  • pydantic-ai-slim (PyPI) Vendor— Affected 1.34.0 to before 1.51.0 Fixed in 1.51.0 Patch available GHSA-wjp5-868j-wqv7

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:*1.34.0 to before 1.51.0Vulnerablepydantic
  • cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:* Versions 1.34.0 to before 1.51.0 Vulnerable ·pydantic

Remediation

  • Fix · CNA pydantic-ai (pydantic) Fixed in 1.51.0
  • Fix · GHSA-wjp5-868j-wqv7 pydantic-ai (PyPI) Fixed in 1.51.0 Advisory →
  • Fix · GHSA-wjp5-868j-wqv7 pydantic-ai-slim (PyPI) Fixed in 1.51.0 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Red Hat Enterprise Linux AI (RHEL AI) 3AffectedNo fix planned: Will not fix

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-25640
  2. 2026-10-03 Alias added: GHSA-wjp5-868j-wqv7

References

  • TI-2026-20687 Pydantic AI Affected by Server-Side Request Forgery (SSRF) in URL Download Handling CVSS 3.1HIGH 8.6
  • TI-2026-69551 Pydantic AI keeps concurrency slots after streams end early CVSS 3.1HIGH 7.5
  • TI-2026-46990 Incorrect authorization in pydantic-ai CVSS 3.1MEDIUM 6.5
  • TI-2026-69610 Cross-site requests run agent tools in pydantic-ai web chat CVSS 3.1HIGH 7.6
  • TI-2026-69617 Pydantic AI blocklist bypass via IPv6 zone identifier allows SSRF CVSS 3.1MEDIUM 6.8
  • TI-2026-39151 Server-side request forgery in pydantic-ai CVSS 3.1MEDIUM 6.8
See all 15 →

Sources