Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:NCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2026-25640 is a high-severity Path Traversal (CWE-22) vulnerability in Pydantic Ai. Its CVSS base score is 7.1 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique /etc/passwd and /etc/shadow (T1003.008); ranked at the 35th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
This vulnerability is AI-related — categorised as AI Agent Protocols and Integrations; in the Supply Chain and Deployment risk domain.
The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.
Deeper analysis AI-assisted summary
Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.
CVE-2026-25640 is a path traversal vulnerability (CWE-22) combined with cross-site scripting (CWE-79) in the Pydantic AI Python agent framework, which is used for building applications and workflows with Generative AI. The issue affects versions from 1.34.0 up to but not including 1.51.0, specifically in the web UI served via the Agent.to_web method or the clai web CLI command. In vulnerable versions, the CDN URL for the chat UI package is constructed using an unvalidated version query parameter from the request URL, enabling attackers to manipulate the server into fetching and serving arbitrary HTML/JavaScript from an attacker-controlled location on the same CDN.
An unauthenticated remote attacker (AV:N/PR:N) can exploit this by crafting a malicious URL with path traversal sequences in the version parameter. If a victim user interacts with the link—such as by clicking it or loading it in an iframe—the attacker-controlled JavaScript executes in the victim's browser context (UI:R). This allows theft of sensitive client-side data, including chat history. The vulnerability requires no privileges and has a CVSS v3.1 base score of 7.1 (C:H/I:L/A:N/S:U), primarily impacting applications deployed locally on localhost or remotely via these specific web interfaces.
The vulnerability is fixed in Pydantic AI version 1.51.0, as detailed in the project's release notes and security advisory. Security practitioners should upgrade affected deployments immediately to mitigate the risk, ensuring validation of the version parameter to prevent unauthorized CDN fetches.
As a framework for Generative AI agents, this flaw highlights risks in AI application web UIs, particularly those relying on untrusted CDN resources, though no real-world exploitation has been reported as of the CVE publication on 2026-02-06.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-5593
Vulnerability Data
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…
more
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.
- CWE(s)
AI Security AnalysisAI
- AI Category
- AI Agent Protocols and Integrations
- Risk Domain
- Supply Chain and Deployment
- OWASP Top 10 for LLMs 2025
- None mapped
- Classification Reason
- Matched keywords: ai, generative ai
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
V5.3.2V1.1.2V1.3.2
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
Enforces the intended directory access authorizations that path traversal would otherwise bypass.
Developer testing and evaluation can discover missing or incorrect input neutralization through targeted web-application tests.
Input validation directly neutralizes special path elements before pathname construction occurs.
Output filtering can catch or sanitize unneutralized script content before it is served to users.
Least privilege reduces the impact of any unauthorized file access obtained via traversal.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Secure SDLC practices directly target introduction of XSS via coding standards/testing (mostly), yet the single broad outcome leaves many specific neutralization vectors unaddressed (partial).
Patching/maintenance can remediate known path-traversal flaws in deployed software (partial prevention of exploitability) but does nothing to stop the coding defect from being introduced in the first place.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Security testing in development catches path traversal via static/dynamic analysis.
Training partially blocks XSS exploitation by making users less likely to click on malicious links delivering XSS payloads and by making developers more likely to add some defensive measures, but it does not stop the underlying code defect from being exploitable, consistent with the AT-2 vs CWE-79 blocks=partial calibration anchor.
Secure coding standards explicitly forbid unsafe path construction and mandate safe APIs.
A.8.8's reach is DISCLOSURE — it sees only instances that carry a vendor-published flaw. Path traversal commonly surfaces as CVEs in third-party components (many examples in the CWE-22 record), so A.8.8 finds that disclosed share; first-party path-traversal defects in the organization's own code are invisible to vulnerability scanning and management, which is the same remainder that caps A.8.8 -> CWE-89 at `partial`.