Skip to content
RCE Write-up Advanced

Your House Has an FFmpeg Problem - elttam

Home Assistant's Wyoming integration passed an attacker-controlled media_id directly to ffmpeg as the -i argument, allowing ffmpeg pseudo-protocols such as concat: and subfile: to be used. An attacker with a paired satellite and an API token could read local files, including /proc/self/environ, and obtain the supervisor token to execute commands as root.

elttam.com

Published on elttam.com

Home Assistant is one of the most popular solutions for running and managing your smart home at the moment. Besides being open-source software (OSS), it has support for a myriad of different devices and services out in the market.

The author, on elttam.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The media_id value was passed to ffmpeg as the -i argument without restricting ffmpeg's pseudo-protocols, so attacker input could select local files and splice them into a valid audio stream.

Impact

An attacker could read any local file, including /proc/self/environ, and use the supervisor token to execute commands as root on the host; exploitation required a paired satellite and a valid API token.

What the attacker needed

Control a paired Wyoming satellite; valid Home Assistant API token; Home Assistant can reach attacker listener

How it was found

  1. Emulate a Wyoming Assist satellite and advertise it via mDNS.
  2. Pair the satellite with the target Home Assistant instance through the dashboard.
  3. Send a request to the announce endpoint with a media_id that chains subfile slices from a local binary and appends the target file.
  4. Receive the transcoded file contents as PCM audio on the attacker-controlled satellite.

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 write-up has not been written yet. The Original tab links to the source.

Home Assistant is software that controls smart-home devices. It used a media player program called ffmpeg to play announcements, and it let a user-supplied value decide which file ffmpeg opened. Because ffmpeg understands special ways of naming files, an attacker could make it read sensitive files on the server instead of audio.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.