Skip to content
RCE Write-up Advanced

SolarWinds Orion Deserialization to RCE vulnerability analysis (CVE-2021–31474)

The SolarWinds Orion Platform's 'test alert actions' feature deserialised JSON with TypeNameHandling enabled, allowing an authenticated user to supply a crafted object that triggered unsafe .NET deserialisation. This could lead to remote code execution, although a blacklist of dangerous types was in place.

testbnull.medium.com

Published on testbnull.medium.com

Sau 2 tháng trời diff patch Exchange thì tới patch của tháng 5 này thì mình đã bị ngộ độc và quá chán nản,

Jang, on testbnull.medium.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 JSON deserialiser was configured with TypeNameHandling.Objects, which lets the attacker specify arbitrary .NET types, and the blacklist of dangerous types was incomplete.

Impact

An authenticated user could achieve remote code execution on the SolarWinds Orion server, though the deserialisation blacklist may block some gadget chains.

What the attacker needed

A valid user account; access to the test alert actions feature

The fix

The vulnerability was fixed in Orion Platform version 2020.2.5, which likely added more types to the deserialisation blacklist or changed the deserialisation settings.

How it was found

  1. Log in to SolarWinds Orion with any user account.
  2. Send a request to the 'test alert actions' feature containing JSON data.
  3. The JSON is deserialised by DeserializeObjectWithTypes, which calls SerializationHelper.FromJson with TypeNameHandling.Objects.
  4. The deserialisation blacklist is applied but does not block all gadgets.
  5. Use a gadget such as SessionSecurityToken to achieve remote code execution.

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.

When a program turns data (like JSON) back into objects, it can be tricked into creating dangerous objects if it trusts type names in the input. Here, the SolarWinds software did that, so a logged-in user could send a special request that made the server run their code. This is called insecure deserialisation.

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.