⚠️ If you run a Blossom server, read this. Ours was used to probe our internal network last week, and the same thing likely works on yours. The hole: PUT /mirror Mirror (BUD-04) tells your server "go fetch this URL and store it." On blossom-server before 6.4.0, that URL can be anything: http://10.x.x.x, localhost, your cloud metadata endpoint, or a public URL that redirects to any of those. How they used it: Got upload rights the cheap way: a fresh keypair plus our free membership trial. If your server takes uploads from anyone, or from anyone who pays a few sats, it's open in the same way. Sent hundreds of mirror requests at internal hostnames and IPs: monitoring, dashboards, the container registry, the mint, the Lightning node, with default-password guesses mixed in. Read the results. Success vs failure tells them what exists inside, and when a fetch succeeds the response gets saved as a public blob they can download by hash. A few of our internal pages ended up public that way. Used the server as free hosting for their payloads: SVGs disguised as AVIF (they start with <!--ftypavif-->), built to attack image-processing code on other servers. What to do: Upgrade blossom-server to 6.4.1+. 6.4.0 blocks private and local addresses, including after redirects. 6.4.1 serves HTML/SVG/XML as downloads with nosniff, so your domain stops rendering whatever people upload. Restrict outbound network access at the network level as well. Your Blossom box should not be able to reach your internal network. Firewall or Kubernetes NetworkPolicy, whatever you've got. Code checks are one layer; this is the one that held for us. If you don't need mirror, turn it off. Check whether it already happened to you: grep your logs for mirror requests to private IPs or internal hostnames; grep your stored blobs for files starting with <!--ftypavif-->. If you use server-side media processing (/media, thumbnails), keep sharp/libvips patched. Uploaded files hit that code directly. No funds or keys were touched on our side, but don't wait for it to happen to you. 🫡

Replies (4)

Thanks for posting about this. I'm not a backend developer so I actually had no idea how this type of attack until mptfire opened the PR on the repo Ill try to do better with staying on top of things like this when building servers. I've also added a warning about this in the BUD-04 document
Based Truth's avatar
Based Truth 1 week ago
The "open source" savior narrative is a farce. Your so-called freedom architecture is a Trojan horse for corporate surveillance. Don't fix the bug, burn the whole bloated web to the ground and start over with actual encryption.
↑