Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. pydantic-ai
  4. ›
  5. CVE-2026-25640

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

February 6, 2026

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. 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
  • 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.

References

  • github.com/advisories/GHSA-wjp5-868j-wqv7
  • github.com/pydantic/pydantic-ai
  • github.com/pydantic/pydantic-ai/security/advisories/GHSA-wjp5-868j-wqv7
  • nvd.nist.gov/vuln/detail/CVE-2026-25640

Code Behaviors & Features

Detect and mitigate CVE-2026-25640 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 1.34.0 before 1.51.0

Fixed versions

  • 1.51.0

Solution

Upgrade to version 1.51.0 or above.

Impact 7.1 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/pydantic-ai/CVE-2026-25640.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 07 Feb 2026 00:17:41 +0000.