Quantum Secular Labs / Blog / Advisories
CVE-2017-0903: Rubygems: Insecure deserialization
CVE-2017-0903 is rated critical with a CVSS v3.0 base score of 9.8 and affects Rubygems, along with 8 other products in NVD’s configuration data. Per its scoring, it can be exploited over the network, without authentication, without any user interaction. The scored impact on confidentiality, integrity and availability is the highest available.
Vulnerability description
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.
Severity breakdown
CVSS v3.0 9.8: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector: Network. Exploitable remotely over the network, with no need for local or physical access.
- Attack complexity: Low. No special conditions; the attack can be repeated reliably.
- Privileges required: None. No account or prior access is needed.
- User interaction: None. No action from any user is needed.
- Scope: Unchanged. Impact stays within the vulnerable component.
- Confidentiality impact: High. Total loss of confidentiality; sensitive data can be fully disclosed.
- Integrity impact: High. Total loss of integrity; data or system state can be fully modified.
- Availability impact: High. Total loss of availability; the component can be shut down.
Underlying weakness
CWE-502: Deserialization of Untrusted Data
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
Affected products
- Rubygems: 2.0.0; 2.0.0 preview2; 2.0.0 preview2.1; 2.0.0 preview2.2; 2.0.0 rc1; 2.0.0 rc2; 2.0.1; 2.0.2; 2.0.3; 2.0.4; 2.0.5; 2.0.6
- Debian Linux: 8.0; 9.0
- Canonical Ubuntu Linux: 14.04; 16.04; 17.10
- Red Hat Enterprise Linux Desktop: 7.0
- Red Hat Enterprise Linux Server: 7.0
- Red Hat Enterprise Linux Server Aus: 7.4; 7.6
- Red Hat Enterprise Linux Server Eus: 7.4; 7.5; 7.6
- Red Hat Enterprise Linux Server Tus: 7.4; 7.6
- Red Hat Enterprise Linux Workstation: 7.0
References
- https://github.com/rubygems/rubygems/commit/510b1638ac9bba3ceb7a5d73135dafff9e5bab49
- http://blog.rubygems.org/2017/10/09/2.6.14-released.html
- http://blog.rubygems.org/2017/10/09/unsafe-object-deserialization-vulnerability.html
- http://www.securityfocus.com/bid/101275
- https://access.redhat.com/errata/RHSA-2017:3485
- https://access.redhat.com/errata/RHSA-2018:0378
- https://access.redhat.com/errata/RHSA-2018:0583
- https://access.redhat.com/errata/RHSA-2018:0585
- https://hackerone.com/reports/274990
- https://lists.debian.org/debian-lts-announce/2018/07/msg00012.html
- https://usn.ubuntu.com/3553-1/
- https://usn.ubuntu.com/3685-1/
- https://www.debian.org/security/2017/dsa-4031