CVE-2017-5637: Zookeeper Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-7cwj-j333-x7f7
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2017-5637 is a HIGH (CVSS 7.5) remote code execution vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Zookeeper libraries in the Maven ecosystem. The issue involves uncontrolled resource consumption in apache zookeeper. Remediation is available by upgrading affected packages to version 3.4.10, 3.5.3.

CVE-2017-5637 at a Glance

CVE Identifier CVE-2017-5637
GHSA Identifier GHSA-7cwj-j333-x7f7
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Zookeeper
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2017-5637

To remediate this vulnerability, upgrade all affected Zookeeper 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.zookeeper:zookeeper fixed: 3.4.10
<dependency>
    <groupId>org.apache.zookeeper</groupId>
    <artifactId>zookeeper</artifactId>
    <version>3.4.10</version>
</dependency>
org.apache.zookeeper:zookeeper fixed: 3.5.3
<dependency>
    <groupId>org.apache.zookeeper</groupId>
    <artifactId>zookeeper</artifactId>
    <version>3.5.3</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.zookeeper

How to Check if You Are Affected

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

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

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

Note: The mvn dependency:tree -Dincludes=org.apache.zookeeper 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Zookeeper, 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

Two four letter word commands "wchp/wchc" are CPU intensive and could cause spike of CPU utilization on Apache ZooKeeper server if abused, which leads to the server unable to serve legitimate client requests. Apache ZooKeeper thru version 3.4.9 and 3.5.2 suffer from this issue, fixed in 3.4.10, 3.5.3, and later.

CVE-2017-5637 Affected Zookeeper Versions

2 component(s)
Fixed Versions:
3.4.103.5.3
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.zookeeper:zookeeper
Maven
≥ 3.4.0
< 3.4.10
3.4.10
org.apache.zookeeper:zookeeper
Maven
≥ 3.5.0
< 3.5.3
3.5.3

References

Frequently Asked Questions

What is CVE-2017-5637?
CVE-2017-5637 is a security vulnerability in Zookeeper involving Uncontrolled Resource Consumption in Apache ZooKeeper under CWE-400: Uncontrolled Resource Consumption.
Which Zookeeper versions are affected?
Affected versions include releases prior to 3.4.10, 3.5.3 across affected packages: org.apache.zookeeper:zookeeper.
What version fixes CVE-2017-5637?
Upgrading to 3.4.10, 3.5.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is zookeeper affected?
Yes, org.apache.zookeeper:zookeeper is affected in releases prior to 3.4.10, 3.5.3. Upgrade your dependency to 3.4.10, 3.5.3 or later.
What is the CVSS score of CVE-2017-5637?
CVE-2017-5637 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2017-5637?
CVE-2017-5637 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Maven dependencies for CVE-2017-5637?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.zookeeper'. 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-7cwj-j333-x7f7",
  "modified" : "2022-07-01T16:58:11Z",
  "published" : "2022-05-13T01:08:23Z",
  "aliases" : [ "CVE-2017-5637" ],
  "summary" : "Uncontrolled Resource Consumption in Apache ZooKeeper",
  "details" : "Two four letter word commands \"wchp/wchc\" are CPU intensive and could cause spike of CPU utilization on Apache ZooKeeper server if abused, which leads to the server unable to serve legitimate client requests. Apache ZooKeeper thru version 3.4.9 and 3.5.2 suffer from this issue, fixed in 3.4.10, 3.5.3, and later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.zookeeper:zookeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.4.0"
      }, {
        "fixed" : "3.4.10"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.4.9"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.zookeeper:zookeeper"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.5.0"
      }, {
        "fixed" : "3.5.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.5.2"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-5637"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:2477"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:3354"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:3355"
  }, {
    "type" : "WEB",
    "url" : "https://issues.apache.org/jira/browse/ZOOKEEPER-2693"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/053d9ce4d579b02203db18545fee5e33f35f2932885459b74d1e4272@%3Cissues.activemq.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/58170aeb7a681d462b7fa31cae81110cbb749d2dc83c5736a0bb8370@%3Cdev.zookeeper.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/bcce5a9c532b386c68dab2f6b3ce8b0cc9b950ec551766e76391caa3@%3Ccommits.nifi.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread.html/rca37935d661f4689cb4119f1b3b224413b22be161b678e6e6ce0c69b@%3Ccommits.nifi.apache.org%3E"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com//security-alerts/cpujul2021.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2020.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2017/dsa-3871"
  }, {
    "type" : "WEB",
    "url" : "http://www.securityfocus.com/bid/98814"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-01T16:58:11Z",
    "nvd_published_at" : "2017-10-10T01:30:00Z"
  }
}