Quick answers
- Is CVE-2026-25640 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-25640 being exploited in the wild.
- How severe is CVE-2026-25640?
- High severity, with a CVSS score of 7.1, published 6 February 2026.
- Which products and versions are affected?
- PydanticAI >= 1.34.0, < 1.51.0; PydanticAI Slim >= 1.34.0, < 1.51.0; pydantic-ai (PyPI) ECOSYSTEM:introduced=1.34.0,fixed=1.51.0; pydantic-ai-slim (PyPI) ECOSYSTEM:introduced=1.34.0,fixed=1.51.0.
- Is there a fix for CVE-2026-25640?
- Yes. pydantic-ai (PyPI): upgrade to 1.51.0 or later; pydantic-ai-slim (PyPI): upgrade to 1.51.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-25640 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-25640?
- Check whether you run PydanticAI, PydanticAI Slim, pydantic-ai (PyPI) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- pydantic-ai (PyPI): upgrade to 1.51.0 or later
pip install "pydantic-ai>=1.51.0" - pydantic-ai-slim (PyPI): upgrade to 1.51.0 or later
pip install "pydantic-ai-slim>=1.51.0"
Technical details
A path traversal vulnerability (CWE-22) and resulting Cross-Site Scripting (XSS) (CWE-79) exist in the Pydantic AI web UI. The application constructs a CDN URL using an unvalidated 'version' query parameter from the request. An attacker can use path traversal sequences in this parameter to force the server to fetch and serve malicious HTML or JavaScript from an arbitrary location on the same CDN. Exploitation requires a victim to visit a crafted URL or interact with a malicious iframe, allowing the attacker to execute code in the victim's browser context and access localStorage data, including chat history. The issue is fixed in version 1.51.0 by hardcoding the CDN URL.
Affected products
- pydantic pydantic-ai >= 1.34.0, < 1.51.0
- pydantic pydantic-ai-slim >= 1.34.0, < 1.51.0
- Red Hat Red Hat Enterprise Linux AI (RHEL AI) 3
Identifiers
- CVE-2026-25640
- GHSA-wjp5-868j-wqv7
- PYSEC-2026-2979
- PYSEC-2026-2983
Timeline
- 2026-01-30: patched: Version 1.51.0 released
- 2026-02-06: advisory: GitHub Advisory GHSA-wjp5-868j-wqv7 published
- 2026-02-06: disclosed: CVE-2026-25640 published
References
- https://github.com/pydantic/pydantic-ai/releases/tag/v1.51.0
- https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-wjp5-868j-wqv7
- https://access.redhat.com/security/cve/CVE-2026-25640
- https://bugzilla.redhat.com/show_bug.cgi?id=2437753
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-25640.json