Am I affected?

type your ash_ai version to check

Description

Origin Validation Error vulnerability in ash-project ash_ai allows a malicious web page to bypass the MCP server's DNS-rebinding protection and issue cross-site requests to a user's local MCP server with that user's actor.

In AshAi.Mcp.Server, with the default allowed_origins: nil, origin_allowed?/3 accepts an origin when uri.host == conn.host and the forwarded scheme is https. Both values are attacker-controlled: conn.host comes from the Host header and the scheme is read from the raw x-forwarded-proto header with no trusted-proxy check. Under DNS rebinding the browser sends the attacker's origin and a matching host, and page JavaScript may set X-Forwarded-Proto: https, so the check passes with no TLS or proxy involved. The fix trusts only localhost origins by default; other origins require an explicit allowed_origins allowlist.

This issue affects ash_ai: from 0.8.0 before 1.0.0.

Weaknesses & attack patterns

Weakness

CWE-346 · Origin Validation Error in catalog → MITRE ↗

Attack patterns

CAPEC-62 · Cross Site Request Forgery MITRE ↗

Affected — Hex / ash_ai Hex.pm ↗ Repository ↗

≥ 0.8.0 < 1.0.0 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*
version type semver
modules · source files · routines
modules 'Elixir.AshAi.Mcp.Server'
source files lib/ash_ai/mcp/server.ex
routines 'Elixir.AshAi.Mcp.Server':check_origin/2 · 'Elixir.AshAi.Mcp.Server':origin_allowed?/3

Affected — GitHub / ash-project/ash_ai Repository ↗

≥ c94f0b1 < 28af68d affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_ai:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules 'Elixir.AshAi.Mcp.Server'
source files lib/ash_ai/mcp/server.ex
routines 'Elixir.AshAi.Mcp.Server':check_origin/2 · 'Elixir.AshAi.Mcp.Server':origin_allowed?/3

References

Credits

Peter Ullrich Finder Reporter
Jonatan Männchen / EEF Coordinator
Zach Daniel / Ash Project Remediation developer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Exploitability

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Active

Vulnerable System

Confidentiality
High
Integrity
High
Availability
None

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs