Spotify and HackerOne: Dismissing Local Threats as ‘Information
The author modified the Spotify desktop client on macOS to load a malicious dynamic library, which gave a reverse shell while the app appeared to run normally. The report was closed as informational because the issue was not remotely triggerable.
Published on medium.com
Recently, I discovered a dylib injection vulnerability in the Spotify desktop client. Before proceeding with a full disclosure, I decided to check HackerOne to verify whether this issue fell within Spotify’s responsible disclosure scope.
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 macOS app loads dynamic libraries from locations an attacker who can already write to the app bundle or its environment can control, with no integrity check.
Impact
An attacker who can already modify the app on the victim's machine could run code inside Spotify and get a reverse shell without visible signs, but the issue requires local access and was not remotely triggerable.
What the attacker needed
Local write access to the app or its files; macOS victim machine
How it was found
- Write a malicious dynamic library containing a reverse shell
- Compile the library with clang
- Use a script and insert_dylib to inject the library into the Spotify binary
- Start a Netcat listener
- Launch Spotify and receive the reverse shell
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 dynamic library is a shared piece of code that a program loads when it starts. If an attacker can make the program load their own library instead, that code runs inside the app with the app's permissions. Here the author did this to the Spotify desktop app on a Mac and got a remote shell, but only after already changing files on the machine.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.