CVE-2026-25640
Pydantic AI affected by Stored XSS via Path Traversal in Web UI CDN URL
- Published
- Updated
- Reserved
- Assigned by
- GitHub_M
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.
Timeline
ID reserved
By GitHub_M
- 2 days later
· 2 days later
Published
- 5 months later
· 5 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | High7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N |
| redhat-SADPADP (enrichment) | 3.1 | High7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N |
| NVDNVD · Modified | 3.1 | Medium5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.37% · top 69% of all CVEs (7 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: High 7.1.
Weakness
Affected products
- affected >= 1.34.0, < 1.51.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIpydantic-aiGHSA-wjp5-868j-wqv7 (opens in a new tab)
- PyPIpydantic-ai-slimGHSA-wjp5-868j-wqv7 (opens in a new tab)
References (5)
- https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-wjp5-868j-wqv7 (opens in a new tab)x_refsource_CONFIRM
- https://github.com/pydantic/pydantic-ai/releases/tag/v1.51.0 (opens in a new tab)x_refsource_MISC
- https://access.redhat.com/security/cve/CVE-2026-25640 (opens in a new tab)vdb-entryx_refsource_REDHAT
- RHBZ#2437753 (opens in a new tab)issue-trackingx_refsource_REDHAT
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25640.json (opens in a new tab)x_sadp-csaf-vex
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-wjp5-868j-wqv7 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2026-25640)Record last updated .