CVE-2026-25640
Last modified
CVE-2026-25640 is a medium-severity vulnerability rated 5.4/10 on the CVSS scale. 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. EPSS estimates a 0.32% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Pydantic | Pydantic Ai | >= 1.34.0, < 1.51.0 |
References
- https://github.com/pydantic/pydantic-ai/releases/tag/v1.51.0Product, Release Notes
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2026-25640?
How severe is CVE-2026-25640?
How do I fix CVE-2026-25640?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-25635calibre is an e-book manager. Prior to 9.2.0, Calibre's CHM …8.6
- CVE-2026-25636calibre is an e-book manager. In 9.1.0 and earlier, a path t…7.8
- CVE-2026-25637ImageMagick is free and open-source software used for editin…5.3
- CVE-2026-25638ImageMagick is free and open-source software used for editin…5.3
- CVE-2026-25639Axios is a promise based HTTP client for the browser and Nod…7.5
- CVE-2026-2564A security flaw has been discovered in Intelbras VIP 3260 Z …9.2
- CVE-2026-25641SandboxJS is a JavaScript sandboxing library. Prior to 0.8.2…9
- CVE-2026-25642HedgeDoc is an open source, real-time, collaborative, markdo…6.1
- CVE-2026-25643Frigate is a network video recorder (NVR) with realtime loca…9.1
- CVE-2026-25644DataHub is an open-source metadata platform. Prior to versio…7.5
- CVE-2026-25645Requests is a HTTP library. Prior to version 2.33.0, the `re…5.5
- CVE-2026-25646LIBPNG is a reference library for use in applications that r…8.1
Are you affected by CVE-2026-25640?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
