Skip to content
RCE Write-up Advanced

Pwn2Own Ireland 2025 – Home Assistant

The Music Assistant add-on exposed an unauthenticated web interface on a second port, and its playlist update command allowed a user to set an arbitrary file path without enforcing the .m3u extension. This let an attacker write a .pth file into the Python site-packages directory, which executed code when a new Python process was spawned, giving remote code execution inside the add-on container.

Emanuele Barbeno Follow

Published on blog.compass-security.com

Pwn2Own is a renowned hacking competition organized by the Zero Day Initiative (ZDI), where security researchers demonstrate previously unknown vulnerabilities in popular software, operating systems, browsers, IoT devices, and other technologies. Having participated in both the 2023 and 2024 editions of Pwn2Own, we…

Emanuele Barbeno, on blog.compass-security.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

Likely the playlist update command trusted a user-supplied file path and did not restrict the extension or directory, allowing a file write into Python's site-packages where .pth files are executed at interpreter start.

Impact

An unauthenticated attacker could run commands inside the Music Assistant container, and the report describes further work to escape the container and reach the host OS, though the container escape details are cut off in the text.

What the attacker needed

Network access to port 8095; no authentication required

How it was found

  1. Scan the Music Assistant container and find port 8095 open without authentication.
  2. Create a local filesystem provider with the root directory as its base path.
  3. Create a playlist, then update its file path to a .pth file inside the Python site-packages directory.
  4. Add a track whose URI contains a newline and Python code, so the file content includes an import statement.
  5. Trigger a new Python process by saving a YouTube Music provider configuration, which runs pip install.
  6. Receive a reverse shell inside the Music Assistant container.

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.

A music add-on for a smart home system had a second web address that anyone could reach without logging in. Its playlist feature let you choose where a playlist file was saved, and the program did not check the file name. By saving a special file in a folder Python reads at startup, the researchers made the server run their own commands.

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.