LiveActive security incident?Get immediate response
CVE Record

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

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.

HighCVSS 7.1Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Pydantic AI chat interfaces can load attacker-controlled browser code when affected versions build their web UI CDN URL from an unvalidated request parameter. A user must visit a malicious link or iframe. Successful exploitation could expose chat history and other client-side data.

Executive priority

Treat this as a high-priority patch for teams using Pydantic AI web chat interfaces. The business risk is data exposure from AI chat sessions, but scope is narrower than a platform-wide server compromise.

Technical view

Versions 1.34.0 through before 1.51.0 are affected when applications use Agent.to_web or clai web. The version query parameter is used to construct a CDN URL without validation, allowing path traversal to different same-CDN content and resulting JavaScript execution in the app context.

Likely exposure

Exposure is limited to Pydantic AI applications serving the chat UI through Agent.to_web or clai web. These are often localhost tools, but remote deployments or shared internal interfaces raise risk, especially where users can be induced to open crafted links.

Exploitation context

The supplied sources do not show known active exploitation, and KEV is false. Exploitation requires user interaction: visiting a malicious URL or loading it through an iframe. The documented impact is browser-side data theft and limited integrity impact.

Researcher notes

Evidence supports CWE-22 and CWE-79: unvalidated CDN path construction enables script execution in the application origin. Sources name the affected feature set and fixed version, but do not provide evidence of exploitation in the wild.

Mitigation direction

  • Upgrade pydantic-ai to 1.51.0 or later where the issue is fixed.
  • Restrict or disable Agent.to_web and clai web chat interfaces until upgraded.
  • Do not expose local or development chat interfaces to untrusted networks.
  • Monitor the GitHub advisory and Red Hat entries for downstream guidance.

Validation and detection

  • Inventory projects for pydantic-ai versions from 1.34.0 to before 1.51.0.
  • Check whether Agent.to_web or clai web serves any chat interface.
  • Identify any remote, shared, or iframe-accessible deployments of the chat UI.
  • Confirm deployed environments run pydantic-ai 1.51.0 or later.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-22: File access and web shell behavior lookup

File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cwe · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

File access behavior lookup

The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-25640 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
7.1 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

2CVSS vectors
5Timeline events
2ADP providers
6Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: partial

CVSS vector scores

2 official scores

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
7.1CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N2.84.2GitHub_M
7.1CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N2.84.2redhat-SADP

Vulnerability scoring details

Base CVSS 3.1 score

7.1High
CVSS 3.1 vector shape for CVE-2026-25640Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. ADP timelineredhat-SADP

    Made public.

  3. CVE publishedCVE Program

    The CVE record was published.

  4. ADP timelineredhat-SADP

    Reported to Red Hat.

  5. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
redhat-SADPPydantic AI: Pydantic AI: Arbitrary code execution and information disclosure via path traversal in web UI
other:Red Hat severity ratingcvssV3_1
  • 2026-02-09T11:03:46.831Z: Reported to Red Hat.
  • 2026-02-06T20:01:53.892Z: Made public.

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
pydanticpydantic-ai>= 1.34.0, < 1.51.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.