CVE-2021-38294: Storm Remote Code Execution Vulnerability

CRITICAL
Advisory Identifier: GHSA-6768-mcjc-8223
CVSS 9.8
CWE-78 CWE-74
Published
Advisory Summary

CVE-2021-38294 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Storm libraries in the Maven ecosystem. The issue involves command injection leading to remote code execution in apache storm. Remediation is available by upgrading affected packages to version 2.2.1, 2.1.1, 1.2.4.

CVE-2021-38294 at a Glance

CVE Identifier CVE-2021-38294
GHSA Identifier GHSA-6768-mcjc-8223
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product Storm
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-38294

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

org.apache.storm:storm fixed: 2.2.1
<dependency>
    <groupId>org.apache.storm</groupId>
    <artifactId>storm</artifactId>
    <version>2.2.1</version>
</dependency>
org.apache.storm:storm fixed: 2.1.1
<dependency>
    <groupId>org.apache.storm</groupId>
    <artifactId>storm</artifactId>
    <version>2.1.1</version>
</dependency>
org.apache.storm:storm fixed: 1.2.4
<dependency>
    <groupId>org.apache.storm</groupId>
    <artifactId>storm</artifactId>
    <version>1.2.4</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=org.apache.storm

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache.storm

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

Note: The mvn dependency:tree -Dincludes=org.apache.storm 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-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Storm, 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

A Command Injection vulnerability exists in the getTopologyHistory service of the Apache Storm 2.x prior to 2.2.1 and Apache Storm 1.x prior to 1.2.4. A specially crafted thrift request to the Nimbus server allows Remote Code Execution (RCE) prior to authentication.

CVE-2021-38294 Affected Storm Versions

3 component(s)
Fixed Versions:
2.2.12.1.11.2.4
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.storm:storm
Maven
≥ 2.2.0
< 2.2.1
2.2.1
org.apache.storm:storm
Maven
≥ 2.0.0
< 2.1.1
2.1.1
org.apache.storm:storm
Maven
≥ 1.0.0
< 1.2.4
1.2.4

References

Frequently Asked Questions

What is CVE-2021-38294?
CVE-2021-38294 is a security vulnerability in Storm involving Command injection leading to Remote Code Execution in Apache Storm under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which Storm versions are affected?
Affected versions include releases prior to 2.2.1, 2.1.1, 1.2.4 across affected packages: org.apache.storm:storm.
What version fixes CVE-2021-38294?
Upgrading to 2.2.1, 2.1.1, 1.2.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is storm affected?
Yes, org.apache.storm:storm is affected in releases prior to 2.2.1, 2.1.1, 1.2.4. Upgrade your dependency to 2.2.1, 2.1.1, 1.2.4 or later.
What is the CVSS score of CVE-2021-38294?
CVE-2021-38294 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-38294?
CVE-2021-38294 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check Maven dependencies for CVE-2021-38294?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.storm'. 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-6768-mcjc-8223",
  "modified" : "2022-10-19T15:36:14Z",
  "published" : "2021-10-27T18:51:22Z",
  "aliases" : [ "CVE-2021-38294" ],
  "summary" : "Command injection leading to Remote Code Execution in Apache Storm",
  "details" : "A Command Injection vulnerability exists in the getTopologyHistory service of the Apache Storm 2.x prior to 2.2.1 and Apache Storm 1.x prior to 1.2.4. A specially crafted thrift request to the Nimbus server allows Remote Code Execution (RCE) prior to authentication.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.storm:storm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.storm:storm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.1.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.storm:storm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.2.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-38294"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/storm"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/r5fe881f6ca883908b7a0f005d35115af49f43beea7a8b0915e377859%40%3Cuser.storm.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://seclists.org/oss-sec/2021/q4/44"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/165019/Apache-Storm-Nimbus-2.2.0-Command-Execution.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-78" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-10-26T17:52:52Z",
    "nvd_published_at" : "2021-10-25T13:15:00Z"
  }
}