CVE-2026-32111: Ha mcp Ha-mcp OAuth 2.1 DCR Mode Vulnerability
MODERATECVE-2026-32111 is a MODERATE (CVSS 5.3) ha-mcp oauth 2.1 dcr mode vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Ha mcp libraries in the PyPI ecosystem. The issue involves ha-mcp oauth 2.1 dcr mode enables network reconnaissance via an error oracle. Remediation is available by upgrading affected packages to version 7.0.0.
CVE-2026-32111 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-32111
To remediate this vulnerability, upgrade all affected Ha mcp dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install ha-mcp>=7.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show ha-mcp
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-32111, inspect your installed packages using pip:
pip show ha-mcp
Analyze the terminal output to locate any version of Ha mcp in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.0.0), your application is affected.
Note: The pip show ha-mcp command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Ha mcp, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-32111 Affected Ha mcp Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ha-mcp
|
PyPI |
< 7.0.0
|
7.0.0
|
References
Frequently Asked Questions
What is CVE-2026-32111?
Which Ha mcp versions are affected?
What version fixes CVE-2026-32111?
Is ha-mcp affected?
What is the CVSS score of CVE-2026-32111?
What CWE is associated with CVE-2026-32111?
How can I check PyPI dependencies for CVE-2026-32111?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fmfg-9g7c-3vq7",
"modified" : "2026-03-12T14:23:37Z",
"published" : "2026-03-12T14:23:37Z",
"aliases" : [ "CVE-2026-32111" ],
"summary" : "ha-mcp OAuth 2.1 DCR mode enables network reconnaissance via an error oracle",
"details" : "### Summary\n\nThe ha-mcp OAuth consent form (beta feature) accepts a user-supplied `ha_url` and makes a server-side HTTP request to `{ha_url}/api/config` with no URL validation. An unauthenticated attacker can submit arbitrary URLs to perform internal network reconnaissance via an error oracle. Two additional code paths in OAuth tool calls (REST and WebSocket) are affected by the same primitive.\n\nThe primary deployment method (private URL with pre-configured `HOMEASSISTANT_TOKEN`) is not affected.\n\n### Details\n\n**Code path 1 — Consent form validation** (reported)\n\nWhen a user submits the OAuth consent form, `_validate_ha_credentials()` (`provider.py`) makes a server-side GET request to `{ha_url}/api/config` with no scheme, IP, or domain validation. Different exception types produce distinct error messages, creating an error oracle:\n\n| Outcome | Message returned | Information leaked |\n|---------|------------------|--------------------|\n| `ConnectError` | \"Could not connect...\" | Host down or port closed |\n| `TimeoutException` | \"Connection timed out...\" | Host up, port filtered |\n| HTTP 401 | \"Invalid access token...\" | Service alive, requires auth |\n| HTTP 403 | \"Access forbidden...\" | Service alive, forbidden |\n| HTTP ≥ 400 | \"Failed to connect: HTTP {N}\" | Service alive, exact status |\n\nAn attacker can drive the flow programmatically: register a client via open DCR (`POST /register`), initiate authorization, extract a `txn_id`, and submit arbitrary `ha_url` values. No user interaction required.\n\n**Code path 2 — REST tool calls with forged token**\n\nOAuth access tokens are stateless base64-encoded JSON payloads (`{\"ha_url\": \"...\", \"ha_token\": \"...\"}`). Since tokens are not signed, an attacker can forge a token with an arbitrary `ha_url`. REST tool calls then make HTTP requests to hardcoded HA API paths on that host (`/config`, `/states`, `/services`, etc.). JSON responses are returned to the caller.\n\nIn practice, path control is limited — most endpoints use absolute paths that ignore the `ha_url` path component. Useful exfiltration requires the target to return JSON at HA API paths, which is unlikely for non-HA services.\n\n**Code path 3 — WebSocket tool calls with forged token**\n\nThe same forged token triggers WebSocket connections to `ws://{ha_url}/api/websocket`. The client follows the HA WebSocket handshake protocol (waits for `auth_required`, sends `auth`, expects `auth_ok`). Non-HA targets fail at the protocol level and return nothing useful. Realistic exploitation is limited to pivoting to another HA instance on the internal network.\n\n### Impact\n\n**Confirmed:** Internal network reconnaissance via error oracle (all 3 code paths). An attacker can map reachable hosts and open ports from the server's network position.\n\n### Scope\n\nOAuth mode is a **beta** feature, documented separately in `docs/OAUTH.md` and not part of the main setup instructions. The standard deployment method (pre-configured `HOMEASSISTANT_URL` and `HOMEASSISTANT_TOKEN`) is not affected.\n\n### Fix\n\nUpgrade to 7.0.0",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "ha-mcp"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "7.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/homeassistant-ai/ha-mcp/security/advisories/GHSA-fmfg-9g7c-3vq7"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-32111"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/homeassistant-ai/ha-mcp"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-03-12T14:23:37Z",
"nvd_published_at" : "2026-03-11T21:16:17Z"
}
}