Skip to content
CSRF Advisory Intermediate CVE-2023-44385CVE-2023-41899

GHSL-2023-161_GHSL-2023-162: Client-Side Request Forgery (CSRF) in the Home Assistant Companion for iOS and macOS - CVE-2023-44385, CVE-2023-41899

The iOS and macOS companion apps for Home Assistant allowed crafted links, QR codes, or shortcuts to invoke arbitrary services on the user's Home Assistant instance without confirmation. Additionally, the hassio.addon_stdin service was vulnerable to a partial server-side request forgery that, when chained with the first issue, could lead to remote code execution.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

The Home Assistant Companion for iOS and macOS app up to version 2023.7.2 are vulnerable to Client-Side Request Forgery. Attackers may send malicious links/QRs to victims that, when visited, will make the victim to call arbitrary services in their Home Assistant installation.

pwntester, on GitHub Security Lab

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The companion apps did not require user confirmation before executing service calls or template rendering via URL handlers, and the hassio.addon_stdin service used unsanitised user input in a format string to construct API request paths.

Impact

This could lead to arbitrary service invocation, denial of service, and potentially remote code execution when chained with the SSRF vulnerability.

What the attacker needed

Victim uses iOS/macOS companion app; victim clicks a link or scans a QR code; attacker can craft a link/QR/shortcut

How it was found

  1. Craft a malicious link, QR code, or shortcut that uses the homeassistant:// URL scheme to call a service.
  2. Send the link to the victim (e.g., via Slack) or embed it in a QR code or shortcut.
  3. Victim clicks the link or scans the QR code, causing the companion app to execute the service call without confirmation.
  4. For the SSRF, use the hassio.addon_stdin service with a crafted addon parameter to traverse to other Supervisor API endpoints.
  5. Send multiple such service calls (e.g., via a shortcut) to install and configure an SSH add-on, leading to remote code execution.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

The Home Assistant phone and Mac apps can be told to do things like turn on lights or run scripts by opening special links. An attacker could trick you into opening such a link, and because the app is already logged in, it would perform actions without asking you. Separately, a service meant to send input to add-ons could be abused to make requests to other parts of the system, potentially leading to full control.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.