CVE-2020-36282: Rabbitmq jms Unsafe Deserialization That Can Result Vulnerability

HIGH
Advisory Identifier: GHSA-v525-c3g5-cg9p
CWE-502
Published
Advisory Summary

CVE-2020-36282 is a HIGH unsafe deserialization that can result vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Rabbitmq jms libraries in the Maven ecosystem. The issue involves unsafe deserialization that can result in code execution. Remediation is available by upgrading affected packages to version 2.2.0, 1.15.2.

CVE-2020-36282 at a Glance

CVE Identifier CVE-2020-36282
GHSA Identifier GHSA-v525-c3g5-cg9p
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Rabbitmq jms
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2020-36282

To remediate this vulnerability, upgrade all affected Rabbitmq jms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.rabbitmq.jms:rabbitmq-jms fixed: 2.2.0
<dependency>
    <groupId>com.rabbitmq.jms</groupId>
    <artifactId>rabbitmq-jms</artifactId>
    <version>2.2.0</version>
</dependency>
com.rabbitmq.jms:rabbitmq-jms fixed: 1.15.2
<dependency>
    <groupId>com.rabbitmq.jms</groupId>
    <artifactId>rabbitmq-jms</artifactId>
    <version>1.15.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.rabbitmq.jms

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2020-36282, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.rabbitmq.jms

Analyze the terminal output to locate any version of Rabbitmq jms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.rabbitmq.jms command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Rabbitmq jms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

JMS Client for RabbitMQ 1.x before 1.15.2 and 2.x before 2.2.0 is vulnerable to unsafe deserialization that can result in code execution via crafted StreamMessage data.

CVE-2020-36282 Affected Rabbitmq jms Versions

2 component(s)
Fixed Versions:
2.2.01.15.2
Product / Package Ecosystem Affected Versions Fixed Version
com.rabbitmq.jms:rabbitmq-jms
Maven
≥ 2.0
< 2.2.0
2.2.0
com.rabbitmq.jms:rabbitmq-jms
Maven
≥ 1.0
< 1.15.2
1.15.2

References

Frequently Asked Questions

What is CVE-2020-36282?
CVE-2020-36282 is a security vulnerability in Rabbitmq jms involving Unsafe Deserialization that can Result in Code Execution under CWE-502: Deserialization of Untrusted Data.
Which Rabbitmq jms versions are affected?
Affected versions include releases prior to 2.2.0, 1.15.2 across affected packages: com.rabbitmq.jms:rabbitmq-jms.
What version fixes CVE-2020-36282?
Upgrading to 2.2.0, 1.15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is rabbitmq-jms affected?
Yes, com.rabbitmq.jms:rabbitmq-jms is affected in releases prior to 2.2.0, 1.15.2. Upgrade your dependency to 2.2.0, 1.15.2 or later.
What CWE is associated with CVE-2020-36282?
CVE-2020-36282 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check Maven dependencies for CVE-2020-36282?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.rabbitmq.jms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v525-c3g5-cg9p",
  "modified" : "2021-03-15T23:45:19Z",
  "published" : "2021-12-10T17:15:49Z",
  "aliases" : [ "CVE-2020-36282" ],
  "summary" : "Unsafe Deserialization that can Result in Code Execution",
  "details" : "JMS Client for RabbitMQ 1.x before 1.15.2 and 2.x before 2.2.0 is vulnerable to unsafe deserialization that can result in code execution via crafted StreamMessage data.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.rabbitmq.jms:rabbitmq-jms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "fixed" : "2.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.rabbitmq.jms:rabbitmq-jms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0"
      }, {
        "fixed" : "1.15.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-36282"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rabbitmq/rabbitmq-jms-client/issues/135"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rabbitmq/rabbitmq-jms-client/pull/136/commits/f647e5dbfe055a2ca8cbb16dd70f9d50d888b638"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rabbitmq/rabbitmq-jms-client/releases/tag/v1.15.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rabbitmq/rabbitmq-jms-client/releases/tag/v2.2.0"
  }, {
    "type" : "WEB",
    "url" : "https://medium.com/@ramon93i7/a99645d0448b"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-15T23:45:19Z",
    "nvd_published_at" : "2021-03-12T01:15:00Z"
  }
}