CVE Vulnerabilities

CVE-2017-0903

Deserialization of Untrusted Data

Published: Oct 11, 2017 | Modified: Apr 20, 2025
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
5.6 MODERATE
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Ubuntu
MEDIUM
root.io logo minimus.io logo echo.ai logo

RubyGems versions between 2.0.0 and 2.6.13 are vulnerable to a possible remote code execution vulnerability. YAML deserialization of gem specifications can bypass class white lists. Specially crafted serialized objects can possibly be used to escalate to remote code execution.

Weakness

The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.

Affected Software

NameVendorStart VersionEnd Version
RubygemsRubygems2.0.0 (including)2.0.0 (including)
RubygemsRubygems2.0.0-preview2 (including)2.0.0-preview2 (including)
RubygemsRubygems2.0.0-preview2.1 (including)2.0.0-preview2.1 (including)
RubygemsRubygems2.0.0-preview2.2 (including)2.0.0-preview2.2 (including)
RubygemsRubygems2.0.0-rc1 (including)2.0.0-rc1 (including)
RubygemsRubygems2.0.0-rc2 (including)2.0.0-rc2 (including)
RubygemsRubygems2.0.1 (including)2.0.1 (including)
RubygemsRubygems2.0.2 (including)2.0.2 (including)
RubygemsRubygems2.0.3 (including)2.0.3 (including)
RubygemsRubygems2.0.4 (including)2.0.4 (including)
RubygemsRubygems2.0.5 (including)2.0.5 (including)
RubygemsRubygems2.0.6 (including)2.0.6 (including)
RubygemsRubygems2.0.7 (including)2.0.7 (including)
RubygemsRubygems2.0.8 (including)2.0.8 (including)
RubygemsRubygems2.0.9 (including)2.0.9 (including)
RubygemsRubygems2.0.10 (including)2.0.10 (including)
RubygemsRubygems2.0.11 (including)2.0.11 (including)
RubygemsRubygems2.0.12 (including)2.0.12 (including)
RubygemsRubygems2.0.13 (including)2.0.13 (including)
RubygemsRubygems2.0.14 (including)2.0.14 (including)
RubygemsRubygems2.0.15 (including)2.0.15 (including)
RubygemsRubygems2.0.16 (including)2.0.16 (including)
RubygemsRubygems2.0.17 (including)2.0.17 (including)
RubygemsRubygems2.1.0 (including)2.1.0 (including)
RubygemsRubygems2.1.0.rc.1 (including)2.1.0.rc.1 (including)
RubygemsRubygems2.1.0.rc.2 (including)2.1.0.rc.2 (including)
RubygemsRubygems2.1.1 (including)2.1.1 (including)
RubygemsRubygems2.1.2 (including)2.1.2 (including)
RubygemsRubygems2.1.3 (including)2.1.3 (including)
RubygemsRubygems2.1.4 (including)2.1.4 (including)
RubygemsRubygems2.1.5 (including)2.1.5 (including)
RubygemsRubygems2.1.6 (including)2.1.6 (including)
RubygemsRubygems2.1.7 (including)2.1.7 (including)
RubygemsRubygems2.1.8 (including)2.1.8 (including)
RubygemsRubygems2.1.9 (including)2.1.9 (including)
RubygemsRubygems2.1.10 (including)2.1.10 (including)
RubygemsRubygems2.1.11 (including)2.1.11 (including)
RubygemsRubygems2.2.0 (including)2.2.0 (including)
RubygemsRubygems2.2.0.preiew.1 (including)2.2.0.preiew.1 (including)
RubygemsRubygems2.2.0.rc.1 (including)2.2.0.rc.1 (including)
RubygemsRubygems2.2.1 (including)2.2.1 (including)
RubygemsRubygems2.2.2 (including)2.2.2 (including)
RubygemsRubygems2.2.3 (including)2.2.3 (including)
RubygemsRubygems2.2.4 (including)2.2.4 (including)
RubygemsRubygems2.2.5 (including)2.2.5 (including)
RubygemsRubygems2.3.0 (including)2.3.0 (including)
RubygemsRubygems2.4.0 (including)2.4.0 (including)
RubygemsRubygems2.4.1 (including)2.4.1 (including)
RubygemsRubygems2.4.2 (including)2.4.2 (including)
RubygemsRubygems2.4.3 (including)2.4.3 (including)
RubygemsRubygems2.4.4 (including)2.4.4 (including)
RubygemsRubygems2.4.5 (including)2.4.5 (including)
RubygemsRubygems2.4.6 (including)2.4.6 (including)
RubygemsRubygems2.4.7 (including)2.4.7 (including)
RubygemsRubygems2.4.8 (including)2.4.8 (including)
RubygemsRubygems2.5.0 (including)2.5.0 (including)
RubygemsRubygems2.5.1 (including)2.5.1 (including)
RubygemsRubygems2.5.2 (including)2.5.2 (including)
RubygemsRubygems2.6.0 (including)2.6.0 (including)
RubygemsRubygems2.6.1 (including)2.6.1 (including)
RubygemsRubygems2.6.2 (including)2.6.2 (including)
RubygemsRubygems2.6.3 (including)2.6.3 (including)
RubygemsRubygems2.6.4 (including)2.6.4 (including)
RubygemsRubygems2.6.5 (including)2.6.5 (including)
RubygemsRubygems2.6.6 (including)2.6.6 (including)
RubygemsRubygems2.6.7 (including)2.6.7 (including)
RubygemsRubygems2.6.8 (including)2.6.8 (including)
RubygemsRubygems2.6.9 (including)2.6.9 (including)
RubygemsRubygems2.6.10 (including)2.6.10 (including)
RubygemsRubygems2.6.11 (including)2.6.11 (including)
RubygemsRubygems2.6.12 (including)2.6.12 (including)
RubygemsRubygems2.6.13 (including)2.6.13 (including)
Red Hat Enterprise Linux 7RedHatruby-0:2.0.0.648-33.el7_4*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatrh-ruby24-ruby-0:2.4.2-86.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatrh-ruby22-ruby-0:2.2.9-19.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6RedHatrh-ruby23-ruby-0:2.3.6-67.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUSRedHatrh-ruby24-ruby-0:2.4.2-86.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUSRedHatrh-ruby22-ruby-0:2.2.9-19.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUSRedHatrh-ruby23-ruby-0:2.3.6-67.el6*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-ruby24-ruby-0:2.4.2-86.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-ruby22-ruby-0:2.2.9-19.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7RedHatrh-ruby23-ruby-0:2.3.6-67.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUSRedHatrh-ruby24-ruby-0:2.4.2-86.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUSRedHatrh-ruby22-ruby-0:2.2.9-19.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7.3 EUSRedHatrh-ruby23-ruby-0:2.3.6-67.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSRedHatrh-ruby24-ruby-0:2.4.2-86.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSRedHatrh-ruby22-ruby-0:2.2.9-19.el7*
Red Hat Software Collections for Red Hat Enterprise Linux 7.4 EUSRedHatrh-ruby23-ruby-0:2.3.6-67.el7*
JrubyUbuntuartful*
JrubyUbuntucosmic*
JrubyUbuntuesm-apps/xenial*
JrubyUbuntulunar*
JrubyUbuntutrusty*
JrubyUbuntutrusty/esm*
JrubyUbuntuupstream*
JrubyUbuntuxenial*
JrubyUbuntuzesty*
Ruby2.0Ubuntutrusty*
Ruby2.3Ubuntuartful*
Ruby2.3Ubuntuesm-infra/xenial*
Ruby2.3Ubuntuxenial*
Ruby2.3Ubuntuzesty*

Potential Mitigations

  • Make fields transient to protect them from deserialization.
  • An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.

References