CVE-2026-107292
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 2.30.0, the Agent.to_web() and clai web development chat server does not validate the Host header, allowing a website visited by a developer to use DNS rebinding to reach a loopback-hosted agent as a same-origin service. The hostile page can read the served UI and submit chat requests that execute agent tools with the local process's privileges and credentials, causing data disclosure or unwanted side effects. Binding to localhost, Origin checks, and CSRF tokens do not prevent the same-origin DNS rebinding path. This issue is fixed in versions 1.107.5 and 2.30.0.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
6.4
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 2.30.0, the Agent.to_web() and clai web development chat server does not validate the Host header, allowing a website visited by a developer to use DNS rebinding to reach a loopback-hosted agent as a same-origin service. The hostile page can read the served UI and submit chat requests that execute agent tools with the local process's privileges and credentials, causing data disclosure or unwanted side effects. Binding to localhost, Origin checks, and CSRF tokens do not prevent the same-origin DNS rebinding path. This issue is fixed in versions 1.107.5 and 2.30.0.
- Record
CVE-2026-107292- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Weakness
- CWE-346, CWE-350
- Updated
- 2026-11-02
EUVDEUVD-2026-95099
6.4
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 2.30.0, the Agent.to_web() and clai web development chat server does not validate the Host header, allowing a website visited by a developer to use DNS rebinding to reach a loopback-hosted agent as a same-origin service. The hostile page can read the served UI and submit chat requests that execute agent tools with the local process's privileges and credentials, causing data disclosure or unwanted side effects. Binding to localhost, Origin checks, and CSRF tokens do not prevent the same-origin DNS rebinding path. This issue is fixed in versions 1.107.5 and 2.30.0.
- Record
EUVD-2026-95099- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-q2xc-rrxj-58x9
6.4
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Summary
The Pydantic AI development web chat UI (Agent.to_web(), clai web) does not validate the Host header of incoming requests. A website a developer visits can use DNS rebinding to make requests to a chat UI running on that developer's machine appear same-origin to the browser, causing the served agent to run and to execute its tools with the privileges and credentials of the local process.
Details
Once a name the attacker controls resolves to the loopback address, the browser treats the request as same-origin, so neither an Origin check nor a CSRF token constrains it — a same-origin page can read the served UI and any token in it.
Binding the web UI to localhost — the default — does not prevent this.
Impact
Applications and developers serving an agent through Agent.to_web() or clai web. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects.
Current browser protections reduce but do not remove this exposure: Chromium's Local Network Access gates loopback subresource requests, but does not cover top-level navigations, and Safari does not implement it.
Mitigation
Upgrade to pydantic-ai/pydantic-ai-slim >= 2.30.0, or >= 1.107.5 on the v1 maintenance line.
The fix validates the Host header and rejects anything other than localhost, a loopback/LAN IP address, or an explicitly allowed host, responding 421 Misdirected Request otherwise. If you serve the web chat UI under a real hostname — behind a reverse proxy, tunnel, or similar — name it explicitly:
app = agent.to_web(allowed_hosts=['ui.example.com'])
- Record
GHSA-q2xc-rrxj-58x9- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Weakness
- CWE-346, CWE-350
- Updated
- 2026-11-02
NVD
6.4
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 2.30.0, the Agent.to_web() and clai web development chat server does not validate the Host header, allowing a website visited by a developer to use DNS rebinding to reach a loopback-hosted agent as a same-origin service. The hostile page can read the served UI and submit chat requests that execute agent tools with the local process's privileges and credentials, causing data disclosure or unwanted side effects. Binding to localhost, Origin checks, and CSRF tokens do not prevent the same-origin DNS rebinding path. This issue is fixed in versions 1.107.5 and 2.30.0.
- Record
CVE-2026-107292- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Weakness
- CWE-346, CWE-350
- Updated
- 2026-11-02
OSV
6.4
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 2.30.0, the Agent.to_web() and clai web development chat server does not validate the Host header, allowing a website visited by a developer to use DNS rebinding to reach a loopback-hosted agent as a same-origin service. The hostile page can read the served UI and submit chat requests that execute agent tools with the local process's privileges and credentials, causing data disclosure or unwanted side effects. Binding to localhost, Origin checks, and CSRF tokens do not prevent the same-origin DNS rebinding path. This issue is fixed in versions 1.107.5 and 2.30.0.
- Record
CVE-2026-107292- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Weakness
- CWE-346, CWE-350
- Updated
- 2026-11-02
OSVGHSA-q2xc-rrxj-58x9
6.4
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Summary
The Pydantic AI development web chat UI (Agent.to_web(), clai web) does not validate the Host header of incoming requests. A website a developer visits can use DNS rebinding to make requests to a chat UI running on that developer's machine appear same-origin to the browser, causing the served agent to run and to execute its tools with the privileges and credentials of the local process.
Details
Once a name the attacker controls resolves to the loopback address, the browser treats the request as same-origin, so neither an Origin check nor a CSRF token constrains it — a same-origin page can read the served UI and any token in it.
Binding the web UI to localhost — the default — does not prevent this.
Impact
Applications and developers serving an agent through Agent.to_web() or clai web. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects.
Current browser protections reduce but do not remove this exposure: Chromium's Local Network Access gates loopback subresource requests, but does not cover top-level navigations, and Safari does not implement it.
Mitigation
Upgrade to pydantic-ai/pydantic-ai-slim >= 2.30.0, or >= 1.107.5 on the v1 maintenance line.
The fix validates the Host header and rejects anything other than localhost, a loopback/LAN IP address, or an explicitly allowed host, responding 421 Misdirected Request otherwise. If you serve the web chat UI under a real hostname — behind a reverse proxy, tunnel, or similar — name it explicitly:
app = agent.to_web(allowed_hosts=['ui.example.com'])
- Record
GHSA-q2xc-rrxj-58x9- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Weakness
- CWE-346, CWE-350
- Updated
- 2026-11-02
OSVPYSEC-2026-4279
6.4
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Summary
The Pydantic AI development web chat UI (Agent.to_web(), clai web) does not validate the Host header of incoming requests. A website a developer visits can use DNS rebinding to make requests to a chat UI running on that developer's machine appear same-origin to the browser, causing the served agent to run and to execute its tools with the privileges and credentials of the local process.
Details
Once a name the attacker controls resolves to the loopback address, the browser treats the request as same-origin, so neither an Origin check nor a CSRF token constrains it — a same-origin page can read the served UI and any token in it.
Binding the web UI to localhost — the default — does not prevent this.
Impact
Applications and developers serving an agent through Agent.to_web() or clai web. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects.
Current browser protections reduce but do not remove this exposure: Chromium's Local Network Access gates loopback subresource requests, but does not cover top-level navigations, and Safari does not implement it.
Mitigation
Upgrade to pydantic-ai/pydantic-ai-slim >= 2.30.0, or >= 1.107.5 on the v1 maintenance line.
The fix validates the Host header and rejects anything other than localhost, a loopback/LAN IP address, or an explicitly allowed host, responding 421 Misdirected Request otherwise. If you serve the web chat UI under a real hostname — behind a reverse proxy, tunnel, or similar — name it explicitly:
app = agent.to_web(allowed_hosts=['ui.example.com'])
- Record
PYSEC-2026-4279- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Updated
- 2026-11-02
OSVPYSEC-2026-4288
6.4
Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
Summary
The Pydantic AI development web chat UI (Agent.to_web(), clai web) does not validate the Host header of incoming requests. A website a developer visits can use DNS rebinding to make requests to a chat UI running on that developer's machine appear same-origin to the browser, causing the served agent to run and to execute its tools with the privileges and credentials of the local process.
Details
Once a name the attacker controls resolves to the loopback address, the browser treats the request as same-origin, so neither an Origin check nor a CSRF token constrains it — a same-origin page can read the served UI and any token in it.
Binding the web UI to localhost — the default — does not prevent this.
Impact
Applications and developers serving an agent through Agent.to_web() or clai web. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects.
Current browser protections reduce but do not remove this exposure: Chromium's Local Network Access gates loopback subresource requests, but does not cover top-level navigations, and Safari does not implement it.
Mitigation
Upgrade to pydantic-ai/pydantic-ai-slim >= 2.30.0, or >= 1.107.5 on the v1 maintenance line.
The fix validates the Host header and rejects anything other than localhost, a loopback/LAN IP address, or an explicitly allowed host, responding 421 Misdirected Request otherwise. If you serve the web chat UI under a real hostname — behind a reverse proxy, tunnel, or similar — name it explicitly:
app = agent.to_web(allowed_hosts=['ui.example.com'])
- Record
PYSEC-2026-4288- CVSS 3.1
- 6.4 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
pydantic-aiPyPI |
1.34.0 up to 1.107.5 | 1.107.5 |
pydantic-aiPyPI |
2.0.0b1 up to 2.30.0 | 2.30.0 |
pydantic-ai-slimPyPI |
1.34.0 up to 1.107.5 | 1.107.5 |
pydantic-ai-slimPyPI |
2.0.0b1 up to 2.30.0 | 2.30.0 |
pydantic-aiPyPI |
1.34.0 up to 1.107.5, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 45 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.35.01.36.01.37.01.38.01.39.01.39.11.40.01.41.01.42.01.43.01.44.01.46.01.47.01.48.01.49.01.50.01.51.01.52.01.53.01.54.01.55.01.56.01.57.01.58.01.59.01.60.01.61.01.62.01.63.01.64.01.65.01.66.01.67.01.68.01.69.01.70.01.71.01.72.01.73.0 |
1.107.5 |
pydantic-aiPyPI |
2.0.0b1 up to 2.30.0, plus listed versions 2.0.02.0.0b22.0.0b32.0.0b42.0.0b5 Show 35 moreShow less2.0.0b62.0.0b72.1.02.10.02.11.02.12.02.13.02.14.02.14.12.15.02.16.02.17.02.18.02.19.02.2.02.20.02.21.02.22.02.23.02.24.02.25.02.26.02.27.02.27.12.28.02.29.02.3.02.4.02.5.02.5.12.6.02.7.02.8.02.9.02.9.1 |
2.30.0 |
pydantic-ai-slimPyPI |
1.34.0 up to 1.107.5, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 45 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.35.01.36.01.37.01.38.01.39.01.39.11.40.01.41.01.42.01.43.01.44.01.46.01.47.01.48.01.49.01.50.01.51.01.52.01.53.01.54.01.55.01.56.01.57.01.58.01.59.01.60.01.61.01.62.01.63.01.64.01.65.01.66.01.67.01.68.01.69.01.70.01.71.01.72.01.73.0 |
1.107.5 |
pydantic-ai-slimPyPI |
2.0.0b1 up to 2.30.0, plus listed versions 2.0.02.0.0b22.0.0b32.0.0b42.0.0b5 Show 35 moreShow less2.0.0b62.0.0b72.1.02.10.02.11.02.12.02.13.02.14.02.14.12.15.02.16.02.17.02.18.02.19.02.2.02.20.02.21.02.22.02.23.02.24.02.25.02.26.02.27.02.27.12.28.02.29.02.3.02.4.02.5.02.5.12.6.02.7.02.8.02.9.02.9.1 |
2.30.0 |
pydantic-aiPyPI |
1.34.0 up to 1.107.5, 2.0.0b1 up to 2.30.0, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 45 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.35.01.36.01.37.01.38.01.39.01.39.11.40.01.41.01.42.01.43.01.44.01.46.01.47.01.48.01.49.01.50.01.51.01.52.01.53.01.54.01.55.01.56.01.57.01.58.01.59.01.60.01.61.01.62.01.63.01.64.01.65.01.66.01.67.01.68.01.69.01.70.01.71.01.72.01.73.0 |
1.107.52.30.0 |
pydantic-ai-slimPyPI |
1.34.0 up to 1.107.5, 2.0.0b1 up to 2.30.0, plus listed versions 1.100.01.101.01.102.01.103.01.104.0 Show 45 moreShow less1.105.01.106.01.107.01.107.11.107.21.107.41.35.01.36.01.37.01.38.01.39.01.39.11.40.01.41.01.42.01.43.01.44.01.46.01.47.01.48.01.49.01.50.01.51.01.52.01.53.01.54.01.55.01.56.01.57.01.58.01.59.01.60.01.61.01.62.01.63.01.64.01.65.01.66.01.67.01.68.01.69.01.70.01.71.01.72.01.73.0 |
1.107.52.30.0 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-107292 is a medium vulnerability (CVSS 6.4) in Pydantic Ai, published October 8, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.13%, the 2nd percentile. Fixed in pydantic-ai 1.107.5.
References
github.com/pydantic/pydantic-ai/security/advisories/GHSA-q2xc-rrxj-58x9
github.com/pydantic/pydantic-ai/pull/7437
github.com/pydantic/pydantic-ai/pull/7438
github.com/pydantic/pydantic-ai/commit/394cc1d31656620704a703a2daed752afa5135fe
github.com/pydantic/pydantic-ai/commit/871c7aeec5dfed2138655ccbccbf15c6d763bae7
github.com/pydantic/pydantic-ai/releases/tag/v1.107.5
Show 7 moreShow less
github.com/pydantic/pydantic-ai/releases/tag/v2.30.0
github.com/advisories/GHSA-q2xc-rrxj-58x9
github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107292.json
nvd.nist.gov/vuln/detail/CVE-2026-107292
github.com/pydantic/pydantic-ai
pypi.org/project/pydantic-ai
pypi.org/project/pydantic-ai-slim
Left out here: 208 versions. The JSON record has them.