Skip to content
RCE Advisory Advanced CVE-2021-25641CVE-2021-30179CVE-2021-30180CVE-2021-30181CVE-2021-32824

GHSL-2021-034_043: Multiple pre-auth RCEs in Apache Dubbo - CVE-2021-25641, CVE-2021-30179, CVE-2021-30180, CVE-2021-30181, CVE-2021-32824

Apache Dubbo deserialised untrusted data from RPC requests in several places, including arguments, attachments, headers and alternative serialisation protocols, allowing an unauthenticated attacker to execute arbitrary code on both consumers and providers.

Alvaro Muñoz Follow

Originally disclosed on GitHub Security Lab

Multiple vulnerabilities have been found in Apache Dubbo enabling attackers to compromise and run arbitrary system commands on both Dubbo consumers and providers.

pwntester, on GitHub Security Lab

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 report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the RPC decoder deserialises attacker-controlled bytes from many parts of the request (arguments, attachments, headers, heartbeats, responses) and allows the attacker to choose the serialisation protocol, so unsafe Java deserialisation is reachable pre-authentication.

Impact

This may lead to pre-auth remote code execution on both Dubbo consumers and providers; the text notes that some deserialisers must be present on the classpath and that the Telnet control mechanism did not block the reported vector.

What the attacker needed

Network access to the Dubbo port; no authentication required; a gadget chain on the classpath

The fix

Patches were released in versions 2.7.10 and 2.6.10.

How it was found

  1. Connect to the Dubbo port and issue an unauthenticated ls command to list services and methods.
  2. Craft an RPC request using a Generic or Echo method name such as $invoke or $echo.
  3. Place a malicious serialised object in an argument, attachment or header field.
  4. Send the request to the provider or consumer to trigger deserialisation and 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 report has not been written yet. The Original tab links to the source.

Dubbo is a system that lets different programs call each other over a network. It turns incoming data back into objects, and if that data is crafted maliciously the process of turning it back can run the attacker's code. Because this happens before any login check, anyone who can reach the port can take over 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.

More by Alvaro Muñoz

View all

132 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

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.