CVSS 3.1
5.4 mediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:NMedium (5.4) in pydantic pydantic ai. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in pydantic-ai 1.51.0.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:Npydantic-ai (PyPI): fixed in 1.51.0pydantic-ai-slim (PyPI): fixed in 1.51.0Explain CVE-2026-25640 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-25640?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-25640?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-25640 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| pydantic:pydantic_ai | from 1.34.0 before 1.51.0 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-wjp5-868j-wqv7 | PyPI | pydantic-ai | >=1.34.0 <1.51.0 | 1.51.0 |
| GHSA-wjp5-868j-wqv7 | PyPI | pydantic-ai-slim | >=1.34.0 <1.51.0 | 1.51.0 |
| PYSEC-2026-2979 | PyPI | pydantic-ai | >=1.34.0 <1.51.0 | 1.51.0 |
| PYSEC-2026-2983 | PyPI | pydantic-ai-slim | >=1.34.0 <1.51.0 | 1.51.0 |
Red Hat rates this Important.
This IMPORTANT vulnerability in Pydantic AI, as included in Red Hat Enterprise Linux AI, involves a path traversal flaw in the web UI's CDN URL construction. An attacker can exploit this by crafting a malicious URL, leading to arbitrary JavaScript execution in a victim's browser if they click the link. This primarily affects deployments utilizing Agent.to_web or clai web for chat interfaces.
To reduce exposure, restrict network access to the Pydantic AI web interface. If the application is deployed on a remote server, configure firewall rules to limit access to trusted networks or localhost. This prevents untrusted clients from reaching the vulnerable component. After applying firewall changes, ensure the rules are persistent and the firewall service is reloaded.
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/bootc-cuda-rhel9 | Will not fix | |
| Red Hat Enterprise Linux AI (RHEL AI) 3 | rhelai3/disk-image-cuda-rhel9 | Will not fix |
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-25640.
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-79.