Vulnerabilities > CVE-2017-5637 - Missing Authentication for Critical Function vulnerability in multiple products

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
HIGH
network
low complexity
apache
debian
CWE-306
nessus
exploit available

Summary

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.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Choosing a Message/Channel Identifier on a Public/Multicast Channel
    Attackers aware that more data is being fed into a multicast or public information distribution means can 'select' information bound only for another client, even if the distribution means itself forces users to authenticate in order to connect initially. Doing so allows the attacker to gain access to possibly privileged information, possibly perpetrate other attacks through the distribution means by impersonation. If the channel/message being manipulated is an input rather than output mechanism for the system, (such as a command bus), this style of attack could change its identifier from a less privileged to more so privileged channel or command.
  • Using Unpublished Web Service APIs
    An attacker searches for and invokes Web Services APIs that the target system designers did not intend to be publicly available. If these APIs fail to authenticate requests the attacker may be able to invoke services and/or gain privileges they are not authorized for.
  • Manipulating Writeable Terminal Devices
    This attack exploits terminal devices that allow themselves to be written to by other users. The attacker sends command strings to the target terminal device hoping that the target user will hit enter and thereby execute the malicious command with their privileges. The attacker can send the results (such as copying /etc/passwd) to a known directory and collect once the attack has succeeded.
  • Cross Site Request Forgery (aka Session Riding)
    An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply "riding" the existing session cookie.

Exploit-Db

idEDB-ID:42294
last seen2018-11-30
modified2017-07-02
published2017-07-02
reporterExploit-DB
sourcehttps://www.exploit-db.com/download/42294
titleZookeeper 3.5.2 Client - Denial of Service

Nessus

  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DLA-986.NASL
    descriptionIt was discovered that Zookeeper, a service for maintaining configuration information, didn
    last seen2020-03-17
    modified2017-06-16
    plugin id100816
    published2017-06-16
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/100816
    titleDebian DLA-986-1 : zookeeper security update
    code
    #%NASL_MIN_LEVEL 80502
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were
    # extracted from Debian Security Advisory DLA-986-1. The text
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(100816);
      script_version("3.7");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/03/12");
    
      script_cve_id("CVE-2017-5637");
    
      script_name(english:"Debian DLA-986-1 : zookeeper security update");
      script_summary(english:"Checks dpkg output for the updated packages.");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "It was discovered that Zookeeper, a service for maintaining
    configuration information, didn't restrict access to the
    computationally expensive wchp/wchc commands which could result in
    denial of service by elevated CPU consumption.
    
    This update disables those two commands by default. The new
    configuration option '4lw.commands.whitelist' can be used to whitelist
    commands selectively (and the full set of commands can be restored
    with '*')
    
    For Debian 7 'Wheezy', these problems have been fixed in version
    3.4.5+dfsg-2+deb7u1.
    
    We recommend that you upgrade your zookeeper packages.
    
    NOTE: Tenable Network Security has extracted the preceding description
    block directly from the DLA security advisory. Tenable has attempted
    to automatically clean and format it as much as possible without
    introducing additional issues."
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://lists.debian.org/debian-lts-announce/2017/06/msg00015.html"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/wheezy/zookeeper"
      );
      script_set_attribute(attribute:"solution", value:"Upgrade the affected packages.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-java");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-java-doc");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-mt-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-mt2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-st-dev");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper-st2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libzookeeper2");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:python-zookeeper");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeper");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeper-bin");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeperd");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/06/15");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/06/16");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"7.0", prefix:"libzookeeper-java", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-java-doc", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-mt-dev", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-mt2", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-st-dev", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper-st2", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"libzookeeper2", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"python-zookeeper", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"zookeeper", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"zookeeper-bin", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    if (deb_check(release:"7.0", prefix:"zookeeperd", reference:"3.4.5+dfsg-2+deb7u1")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyDebian Local Security Checks
    NASL idDEBIAN_DSA-3871.NASL
    descriptionIt was discovered that Zookeeper, a service for maintaining configuration information, didn
    last seen2020-06-01
    modified2020-06-02
    plugin id100579
    published2017-06-02
    reporterThis script is Copyright (C) 2017-2018 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/100579
    titleDebian DSA-3871-1 : zookeeper - security update
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    # The descriptive text and package checks in this plugin were  
    # extracted from Debian Security Advisory DSA-3871. The text 
    # itself is copyright (C) Software in the Public Interest, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(100579);
      script_version("3.8");
      script_cvs_date("Date: 2018/11/10 11:49:38");
    
      script_cve_id("CVE-2017-5637");
      script_xref(name:"DSA", value:"3871");
    
      script_name(english:"Debian DSA-3871-1 : zookeeper - security update");
      script_summary(english:"Checks dpkg output for the updated package");
    
      script_set_attribute(
        attribute:"synopsis", 
        value:"The remote Debian host is missing a security-related update."
      );
      script_set_attribute(
        attribute:"description", 
        value:
    "It was discovered that Zookeeper, a service for maintaining
    configuration information, didn't restrict access to the
    computationally expensive wchp/wchc commands which could result in
    denial of service by elevated CPU consumption.
    
    This update disables those two commands by default. The new
    configuration option '4lw.commands.whitelist' can be used to whitelist
    commands selectively (and the full set of commands can be restored
    with '*')"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://packages.debian.org/source/jessie/zookeeper"
      );
      script_set_attribute(
        attribute:"see_also",
        value:"https://www.debian.org/security/2017/dsa-3871"
      );
      script_set_attribute(
        attribute:"solution", 
        value:
    "Upgrade the zookeeper packages.
    
    For the stable distribution (jessie), this problem has been fixed in
    version 3.4.5+dfsg-2+deb8u2."
      );
      script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:N/I:N/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:zookeeper");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:8.0");
    
      script_set_attribute(attribute:"patch_publication_date", value:"2017/06/01");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/06/02");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_copyright(english:"This script is Copyright (C) 2017-2018 and is owned by Tenable, Inc. or an Affiliate thereof.");
      script_family(english:"Debian Local Security Checks");
    
      script_dependencies("ssh_get_info.nasl");
      script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");
    
      exit(0);
    }
    
    
    include("audit.inc");
    include("debian_package.inc");
    
    
    if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
    if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
    if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);
    
    
    flag = 0;
    if (deb_check(release:"8.0", prefix:"libzookeeper-java", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"libzookeeper-java-doc", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"libzookeeper-mt-dev", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"libzookeeper-mt2", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"libzookeeper-st-dev", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"libzookeeper-st2", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"libzookeeper2", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"python-zookeeper", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"zookeeper", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"zookeeper-bin", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    if (deb_check(release:"8.0", prefix:"zookeeperd", reference:"3.4.5+dfsg-2+deb8u2")) flag++;
    
    if (flag)
    {
      if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());
      else security_warning(0);
      exit(0);
    }
    else audit(AUDIT_HOST_NOT, "affected");
    
  • NASL familyMisc.
    NASL idAPACHE_ZOOKEEPER_3_5_3.NASL
    descriptionThe version of Apache ZooKeeper listening on the remote host is prior to 3.4.10 or 3.5.x prior to 3.5.3. It is, therefore, affected by multiple vulnerabilities: - A buffer overflow vulnerability in the C cli shell. Using the
    last seen2020-06-01
    modified2020-06-02
    plugin id125634
    published2019-05-31
    reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/125634
    titleApache ZooKeeper 3.4.0 < 3.4.10 / 3.5.x < 3.5.3 Multiple Vulnerabilities
    code
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(125634);
      script_version("1.2");
      script_cvs_date("Date: 2019/06/04  9:45:00");
    
      script_cve_id("CVE-2016-5017", "CVE-2017-5637");
      script_bugtraq_id(93044,98814);
      script_xref(name:"IAVB", value:"2019-B-0041");
    
      script_name(english:"Apache ZooKeeper 3.4.0 < 3.4.10 / 3.5.x < 3.5.3 Multiple Vulnerabilities");
      script_summary(english:"Checks ZooKeeper version");
    
      script_set_attribute(attribute:"synopsis", value:"The remote Apache ZooKeeper server is 
      affected by multiple vulnerabilities.");
      script_set_attribute(attribute:"description", value:
    "The version of Apache ZooKeeper listening on the remote host is prior
    to 3.4.10 or 3.5.x prior to 3.5.3. It is, therefore, affected by multiple
    vulnerabilities:
    
      - A buffer overflow vulnerability in the C cli shell. Using 
        the 'cmd:' batch mode syntax allows attackers to have an 
        unspecified impact via a long command string. 
        (CVE-2016-5017)
    
      - A denial of service (DoS) vulnerability exists in due to two
        four letter word commands which cause CPU spikes on ZooKeeper
        server. An unauthenticated, remote attacker can exploit this 
        issue to cause the application to stop responding. 
        (CVE-2017-5637)");
      script_set_attribute(attribute:"see_also", value:"https://zookeeper.apache.org/security.html");
      script_set_attribute(attribute:"solution", value:
    "Update to Apache ZooKeeper 3.4.10 or 3.5.3 or later.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P");
      script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-5017");
      script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
      script_set_attribute(attribute:"exploit_available", value:"true");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2016/09/21");
      script_set_attribute(attribute:"patch_publication_date", value:"2016/09/21");
      script_set_attribute(attribute:"plugin_publication_date", value:"2019/05/31");
    
      script_set_attribute(attribute:"plugin_type", value:"combined");
      script_set_attribute(attribute:"cpe", value:"cpe:/a:apache:zookeeper");
      script_set_attribute(attribute:"potential_vulnerability", value:"true");
      script_set_attribute(attribute:"stig_severity", value:"I");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"Misc.");
    
      script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("apache_zookeeper_detect.nasl");
      script_require_keys("Settings/ParanoidReport");
      script_require_ports("Services/zookeeper", 2181);
    
      exit(0);
    }
    
    include("audit.inc");
    include("global_settings.inc");
    include("misc_func.inc");
    include("vcf.inc");
    
    port = get_service(svc:"zookeeper", default:2181, exit_on_fail:TRUE);
    app_info = vcf::get_app_info(app:"Apache Zookeeper", port:port, service:TRUE);
    
    # Paranoid because patch exists unrelated to version
    if (report_paranoia < 2) audit(AUDIT_PARANOID);
    
    constraints = [
      { "fixed_version" : "3.4.10"},
      { "min_version" : "3.5.0", "fixed_version" : "3.5.3" }
    ];
    vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_WARNING);
    
  • NASL familyFreeBSD Local Security Checks
    NASL idFREEBSD_PKG_AF61B2719E474DB0A0F629FB032236A3.NASL
    descriptionzookeeper developers report : Two four letter word commands
    last seen2020-06-01
    modified2020-06-02
    plugin id103762
    published2017-10-11
    reporterThis script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/103762
    titleFreeBSD : zookeeper -- Denial Of Service (af61b271-9e47-4db0-a0f6-29fb032236a3)

Redhat

advisories
  • rhsa
    idRHSA-2017:2477
  • rhsa
    idRHSA-2017:3354
  • rhsa
    idRHSA-2017:3355

References