Finding Deserialization Bugs In The Solarwind Platform
Four deserialisation flaws in the SolarWinds platform let an attacker control the type of object being deserialised, either through an AMQP message property or through XML/JSON fields in SWIS verb arguments. By supplying a malicious type and a matching gadget payload, an attacker could achieve remote code execution.
Published on zerodayinitiative.com
It’s been a while since I have written a blog post, please accept my sincerest apologies. This is because a lot of fun stuff that I’ve recently done is going to be presented during conferences.
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 deserialisers were configured to trust a type name supplied by the attacker (TypeNameHandling.Auto, or a type taken from a JSON or XML field) instead of a fixed allow-list.
Impact
An attacker who can reach the message bus or the API could run arbitrary code on the SolarWinds server; the text notes the bus needs credentials, which high-privileged users could extract and later low-privileged users could too via a separate CVE.
What the attacker needed
Credentials for the RabbitMQ bus; network access to port 5671/TCP; or API access for the SWIS verb bugs
The fix
The issues were fixed by SolarWinds, though the author notes that hardcoding the outer type alone would not have stopped the inner-type variant.
How it was found
- Send an AMQP message to the Information Service with the Routing-Key set to SwisPubSub.
- Set the message Type property to a dangerous type.
- Put a JSON.NET gadget in the message body so the type is deserialised and code runs.
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.
Deserialisation is when a program turns stored data back into objects. If the program also lets the sender choose which class of object to build, an attacker can pick a dangerous class that runs code when it is created. Here the attacker could choose that class and supply the matching data, so the server ran their code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.