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

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.37%, higher than 33% of CVEs (2026-12-01)
- Published: 2026-02-06T18:51:57.000Z
- Modified: 2026-07-15T02:18:55.463Z
- Also known as: GHSA-wjp5-868j-wqv7, PYSEC-2026-2979, PYSEC-2026-2983
- Weaknesses: CWE-22, CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- pydantic pydantic-ai: >= 1.34.0, < 1.51.0
- rhelai3/bootc-cuda-rhel9: no versions given
- rhelai3/disk-image-cuda-rhel9: no versions given
- pydantic-ai (PyPI): from 1.34.0 before 1.51.0
- pydantic-ai-slim (PyPI): from 1.34.0 before 1.51.0
- pydantic pydantic_ai: from 1.34.0 before 1.51.0

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- redhat-SADP: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N`

## References

- <https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-wjp5-868j-wqv7> (vendor-advisory, web)
- <https://github.com/pydantic/pydantic-ai/releases/tag/v1.51.0> (product, release-notes, web)
- <https://access.redhat.com/security/cve/CVE-2026-25640> (vdb-entry)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2437753> (issue-tracking)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25640.json>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25640> (advisory)
- <https://github.com/pydantic/pydantic-ai> (package)
- <https://pypi.org/project/pydantic-ai> (package)
- <https://github.com/advisories/GHSA-wjp5-868j-wqv7> (advisory)
- <https://pypi.org/project/pydantic-ai-slim> (package)

## Sources

- CVE List: [CVE-2026-25640](https://www.cve.org/CVERecord?id=CVE-2026-25640), CVE Terms of Use, modified 2026-07-15
- GitHub Advisory Database: [GHSA-wjp5-868j-wqv7](https://github.com/advisories/GHSA-wjp5-868j-wqv7), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-25640](https://nvd.nist.gov/vuln/detail/CVE-2026-25640), Public domain, modified 2026-07-15
- PyPA Advisory Database: [PYSEC-2026-2979](https://osv.dev/vulnerability/PYSEC-2026-2979), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-2983](https://osv.dev/vulnerability/PYSEC-2026-2983), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-25640 · Whole record: https://cve.day/CVE-2026-25640.json · Rebuilt by cve.day 2026-11-25T22:59:13.572Z
