Skip to content

GHSA-r577-4hq7-73qh CVE-2021-36162

Remote Code Execution in Apache Dubbo

High Maven
Severity
8.8 / 10
High · CVSS 3.1
Exploit chance (EPSS)
2.26%
Chance of exploitation in the next 30 days. Higher than 82.99% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection')
Fix
2.7.13
Upgrade org.apache.dubbo:dubbo to this version or later

Description

Apache Dubbo supports various rules to support configuration override or traffic routing (called routing in Dubbo). These rules are loaded into the configuration center (eg: Zookeeper, Nacos, ...) and retrieved by the customers when making a request in order to find the right endpoint. When parsing these YAML rules, Dubbo customers will use SnakeYAML library to load the rules which by default will enable calling arbitrary constructors. An attacker with access to the configuration center he will be able to poison the rule so when retrieved by the consumers, it will get RCE on all of them. This was fixed in Dubbo 2.7.13, 3.0.2

Affected versions

Maven

PackageVulnerableFixed in
org.apache.dubbo:dubbo
< 2.7.13
2.7.13
org.apache.dubbo:dubbo
>= 3.0.0, < 3.0.2
3.0.2

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

org.apache.dubbo:dubbo Maven → 2.7.13

maven
<dependency><groupId>org.apache.dubbo</groupId><artifactId>dubbo</artifactId><version>2.7.13</version></dependency>
gradle
implementation("org.apache.dubbo:dubbo:2.7.13")

Severity breakdown

CVSS 3.1 8.8

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Weakness

CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.

How to prevent it
  • Architecture and Design: If at all possible, use library calls rather than external processes to recreate the desired functionality.
  • Implementation: If possible, ensure that all external commands called from the program are statically created.
  • Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
  • Operation: Run time: Run time policy enforcement may be used in an allowlist fashion to prevent use of any non-sanctioned commands.
  • System Configuration: Assign permissions that prevent the user from accessing/opening privileged files.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-97rv-88gf-phvr
Apache Dubbo: Bypass deny serialize list check in Apache Dubbo
Critical Also affects org.apache.dubbo:dubbo
GHSA-6x49-w35h-wqrj
Bypass serialize checks in Apache Dubbo
Critical Also affects org.apache.dubbo:dubbo
GHSA-933g-v89r-x8pf
Apache Dubbo vulnerable to Deserialization of Untrusted Data
Critical Also affects org.apache.dubbo:dubbo
GHSA-5qwq-g2hx-r6f7
Hessian Lite for Apache Dubbo deserialization vulnerability
Critical Also affects org.apache.dubbo:dubbo
GHSA-gm48-83x4-84jg
Server-side request forgery in Apache Dubbo
Medium Also affects org.apache.dubbo:dubbo
GHSA-7wfc-x4f7-gg2x
Code injection in Apache Dubbo
Critical Also affects org.apache.dubbo:dubbo
GHSA-5mc7-m686-p6jg
Deserialization of Untrusted Data in Apache Dubbo
Critical Also affects org.apache.dubbo:dubbo
GHSA-qmfc-6www-fjqw
Code injection in Apache Dubbo
Critical Also affects org.apache.dubbo:dubbo
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor