cve.bz

CVE-2026-107295 pydantic pydantic ai: Cross Site Reference Forgery

7.6 highEPSS 0.2%Fix available

High (7.6) in pydantic pydantic ai. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in pydantic-ai 1.107.4, 2.28.0.

On this page
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 1.107.4 and 2.28.0, the Agent.to_web() and clai web development chat endpoint has missing request content-type validation. A website visited by a developer can submit a browser-compatible request to a loopback-hosted chat server, causing the served agent to run and execute tools with the privileges and credentials of the local process; client-relayed approval decisions also leave requires_approval=True tools exposed. Binding to localhost does not prevent a browser page from reaching the loopback address. This issue is fixed in versions 1.107.4 and 2.28.0.

Severity

CVSS 3.1

7.6 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 5th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-10-08. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-352 Cross-Site Request Forgery (Cross Site Reference Forgery)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-107295 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-107295?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-107295?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-107295 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.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
pydantic:pydantic_aifrom 1.34.0 before 1.107.4
pydantic:pydantic_aifrom 2.0.0 before 2.28.0

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-h4xc-3qfq-jf93PyPIpydantic-ai>=1.34.0 <1.107.41.107.4
GHSA-h4xc-3qfq-jf93PyPIpydantic-ai>=2.0.0b1 <2.28.02.28.0
GHSA-h4xc-3qfq-jf93PyPIpydantic-ai-slim>=1.34.0 <1.107.41.107.4
GHSA-h4xc-3qfq-jf93PyPIpydantic-ai-slim>=2.0.0b1 <2.28.02.28.0
PYSEC-2026-4278PyPIpydantic-ai>=1.34.0 <1.107.4
>=2.0.0b1 <2.28.0
1.107.4, 2.28.0
PYSEC-2026-4287PyPIpydantic-ai-slim>=1.34.0 <1.107.4
>=2.0.0b1 <2.28.0
1.107.4, 2.28.0

Red Hat

Red Hat rates this Important.

Red Hat's statement

An IMPORTANT severity flaw was found in the pydantic-ai-slim Python package, which is included in Red Hat Lightspeed Core (the lightspeed-stack-rhel9 container). The local development web chat interface (Agent.to_web() and the clai web endpoint) does not validate the Content-Type of requests to its chat endpoint. A remote attacker can host a malicious website that, when visited by a developer while the chat server is running on their machine, submits a browser-compatible cross-origin request to the loopback-hosted server, causing the served agent to run and execute its tools with the privileges and credentials of the local process. Because the endpoint trusts approval decisions relayed by the client, tools marked requires_approval=True are not protected either. Binding the server to localhost does not prevent this attack, since a page open in the developer's browser can reach the loopback address. The affected Lightspeed Core streams (lightspeed-core-0.6 and lightspeed-core-0.7) are resolved as DELEGATED, and a fix is being pursued with the maintaining team. Red Hat's severity rating matches the upstream assessment.

Red Hat's mitigation

The upstream project has released a fix and recommends upgrading to a patched version of pydantic-ai-slim, in which the chat endpoint requires a Content-Type: application/json header and rejects other requests before the request body is parsed and before the agent runs. If upgrading is not immediately possible, the following upstream guidance reduces the risk: do not run the development web chat UI (Agent.to_web() or clai web) while browsing untrusted websites, stop the web UI when it is not in use, and do not serve an agent with side-effecting tools through it.

ProductPackageStateAdvisory
Lightspeed Corelightspeed-core/lightspeed-stack-rhel9Affected

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-107295.

Attack patterns (CAPEC)

  • CAPEC-62 Cross Site Request Forgery Likelihood: High · Severity: Very High
  • CAPEC-111 JSON Hijacking (aka JavaScript Hijacking) Likelihood: High · Severity: High
  • CAPEC-462 Cross-Domain Search Timing Severity: Medium
  • CAPEC-467 Cross Site Identification Severity: Low

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON