7.1

CVE-2026-25640: Pydantic AI affected by Stored XSS via Path Traversal in Web UI CDN URL

Modified
AliasesGHSA-wjp5-868j-wqv7PYSEC-2026-2979PYSEC-2026-2983
Published 06-02-2026Last modified 15-07-2026

Vulnerability summary

CVE-2026-25640 is a high (CVSS 7.1) vulnerability in pydantic pydantic_ai. EPSS estimates a 0.37% chance of exploitation in the next 30 days, higher than 31.1% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 7.1, network access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.1/10
010
High · v3.1 (CVE.org)
EPSS score
0.37%
0%100%
Low · -0.09 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Timeline

  1. 06-02-2026
    PublishedVulnerability first disclosed.
  2. 15-07-2026
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

3 scores · 3 sources · 1 version

EPSS trend

Probability

0.37%

Chance of exploitation in the next 30 days

Percentile

31%

Versus all other CVEs

30-day change

Decrease -0.09 pp

From 0.46% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.

Pydantic2 products
PyPI2 products
  • pydantic-ai≥ 1.34.0, < 1.51.0
  • pydantic-ai-slim≥ 1.34.0, < 1.51.0

2 vendors · 4 products

References

10 links