CVE Vulnerabilities

CVE-2017-0899

Improper Neutralization of Escape, Meta, or Control Sequences

Published: Aug 31, 2017 | Modified: Nov 21, 2024
CVSS 3.x
9.8
CRITICAL
Source:
NVD
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.5 HIGH
AV:N/AC:L/Au:N/C:P/I:P/A:P
RedHat/V2
RedHat/V3
4.3 LOW
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
Ubuntu
NEGLIGIBLE

RubyGems version 2.6.12 and earlier is vulnerable to maliciously crafted gem specifications that include terminal escape characters. Printing the gem specification would execute terminal escape sequences.

Weakness

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component.

Affected Software

Name Vendor Start Version End Version
Rubygems Rubygems * 2.6.12 (including)
Jruby Ubuntu artful *
Jruby Ubuntu bionic *
Jruby Ubuntu cosmic *
Jruby Ubuntu disco *
Jruby Ubuntu eoan *
Jruby Ubuntu esm-apps/bionic *
Jruby Ubuntu esm-apps/focal *
Jruby Ubuntu esm-apps/xenial *
Jruby Ubuntu focal *
Jruby Ubuntu groovy *
Jruby Ubuntu hirsute *
Jruby Ubuntu impish *
Jruby Ubuntu lunar *
Jruby Ubuntu mantic *
Jruby Ubuntu trusty *
Jruby Ubuntu trusty/esm *
Jruby Ubuntu xenial *
Jruby Ubuntu zesty *
Ruby1.9.1 Ubuntu trusty *
Ruby2.0 Ubuntu trusty *
Ruby2.3 Ubuntu artful *
Ruby2.3 Ubuntu upstream *
Ruby2.3 Ubuntu xenial *
Ruby2.3 Ubuntu zesty *
Red Hat Enterprise Linux 7 RedHat ruby-0:2.0.0.648-33.el7_4 *
Red Hat Software Collections for Red Hat Enterprise Linux 6 RedHat rh-ruby24-ruby-0:2.4.2-86.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6 RedHat rh-ruby22-ruby-0:2.2.9-19.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6 RedHat rh-ruby23-ruby-0:2.3.6-67.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS RedHat rh-ruby24-ruby-0:2.4.2-86.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS RedHat rh-ruby22-ruby-0:2.2.9-19.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS RedHat rh-ruby23-ruby-0:2.3.6-67.el6 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby24-ruby-0:2.4.2-86.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby22-ruby-0:2.2.9-19.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7 RedHat rh-ruby23-ruby-0:2.3.6-67.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS RedHat rh-ruby24-ruby-0:2.4.2-86.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS RedHat rh-ruby22-ruby-0:2.2.9-19.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUS RedHat rh-ruby23-ruby-0:2.3.6-67.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat rh-ruby24-ruby-0:2.4.2-86.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat rh-ruby22-ruby-0:2.2.9-19.el7 *
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUS RedHat rh-ruby23-ruby-0:2.3.6-67.el7 *

Potential Mitigations

  • 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.

References