CVE-2026-25640 json
Pydantic AI affected by Stored XSS via Path Traversal in Web UI CDN URL
published 2026-02-06 9 mo ago modified 2026-07-15 3 mo ago also GHSA-wjp5-868j-wqv7 , PYSEC-2026-2979 , PYSEC-2026-2983 , EUVD-2026-5593
- cvss
- 7.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 31%
- public exploits
- 0
- none known
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.
Patch / fix
- pypi pydantic-ai 1.51.0
- pypi pydantic-ai-slim 1.51.0
- pydantic pydantic_ai 1.51.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-25640 updated cvss 7.1
Pydantic AI: Pydantic AI: Arbitrary code execution and information disclosure via path traversal in web UI
-
Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/disk-image-cuda-rhel9affected: workaround, no fix planned “Will not fix”
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 9 mo ago
Exploit prediction
0.37% chance of exploitation in the next 30 days, higher than 31% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N |
| CISA ADP | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N |
| NVD | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| GitHub | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N |
| OSV | 3.1 | 7.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | pydantic-ai | >=1.34.0, <1.51.0 |
1.51.0 |
| pypi | pydantic-ai-slim | >=1.34.0, <1.51.0 |
1.51.0 |
Affected products
- pydantic pydantic-ai
- Red Hat Red Hat Enterprise Linux AI (RHEL AI) 3
Classification
References
-
github.com
/pydantic/pydantic-ai/security/advisories/GHSA-wjp5-868j-wqv7
web, vendor-advisory
-
github.com
/pydantic/pydantic-ai/releases/tag/v1.51.0
web, product, release-notes
-
access.redhat.com
/security/cve/CVE-2026-25640
vdb-entry
-
bugzilla.redhat.com
/show_bug.cgi?id=2437753
issue-tracking
- security.access.redhat.com /data/csaf/v2/vex/2026/cve-2026-25640.json
-
nvd.nist.gov
/vuln/detail/CVE-2026-25640
advisory
-
github.com
/pydantic/pydantic-ai
package
-
pypi.org
/project/pydantic-ai
package
-
github.com
/advisories/GHSA-wjp5-868j-wqv7
advisory
-
pypi.org
/project/pydantic-ai-slim
package
Sources
- CVE List CVE-2026-25640
- GitHub Advisory GHSA-wjp5-868j-wqv7
- NVD CVE-2026-25640
- OSV PYSEC-2026-2979
- OSV PYSEC-2026-2983
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.