Deserialization of Untrusted Data Vulnerability in RubyGems and JRuby

jruby Updated 02 Oct 2025

Summary

13/03/2018
N/A
Yes i
High
7.8

CVE-2018-1000074: RubyGems version Ruby 2.2 series: 2.2.9 and earlier, Ruby 2.3 series: 2.3.6 and earlier, Ruby 2.4 series: 2.4.3 and earlier, Ruby 2.5 series: 2.5.0 and earlier, prior to trunk revision 62422 contains a Deserialization of... Affects jruby across 2 version ranges.

< 9.1.17.0-1 < 254e3d0ee873c008c0b74e8b8abcbdab4caa0a6d

Fixed in 9.1.17.0-1. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

RubyGems is a package manager for the Ruby programming language, facilitating the distribution and management of Ruby libraries (gems). It allows developers to easily install, update, and manage dependencies for their Ruby applications. JRuby is an implementation of Ruby that runs on the Java Virtual Machine (JVM). The vulnerability in question affects specific versions of RubyGems and JRuby, making them susceptible to code execution through the gem owner command when handling specially crafted YAML files.

Vulnerability Detail

The vulnerability, identified as CVE-2018-1000074, arises from the deserialization of untrusted data within the gem owner command of RubyGems. This flaw can lead to arbitrary code execution if a user runs the command on a gem containing a maliciously crafted YAML file. The affected versions include RubyGems in the Ruby 2.2 series (2.2.9 and earlier), Ruby 2.3 series (2.3.6 and earlier), Ruby 2.4 series (2.4.3 and earlier), and Ruby 2.5 series (2.5.0 and earlier). The vulnerability has a CVSS score of 7.8, indicating a high severity level.

How To Fix

Minimum fixed version

9.1.17.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade jruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the gem owner command on gems that you suspect may contain untrusted YAML files. Additionally, consider validating the contents of YAML files before executing commands that process them.

Conclusion

CVE-2018-1000074 is a significant vulnerability affecting RubyGems and JRuby, allowing for potential code execution through the gem owner command. Users are strongly advised to upgrade to the latest versions to mitigate this risk. For those unable to upgrade immediately, implementing workarounds can help reduce exposure.

See every vulnerability recorded for jruby →

Share this vulnerability

FAQ

CVE-2018-1000074 is a vulnerability in RubyGems and JRuby that allows for code execution through the deserialization of untrusted data in the gem owner command.

Affected versions include RubyGems in the Ruby 2.2 series (2.2.9 and earlier), Ruby 2.3 series (2.3.6 and earlier), Ruby 2.4 series (2.4.3 and earlier), and Ruby 2.5 series (2.5.0 and earlier).

You can use Vulert, which monitors open-source vulnerabilities in your software. By simply uploading your manifest file like package-lock.json, you can check for vulnerabilities without any installation.

If an immediate upgrade is not possible, refrain from using the gem owner command on potentially unsafe gems and validate YAML files before processing them.

The CVSS score for CVE-2018-1000074 is 7.8, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for jruby.

How To Fix

Minimum fixed version

9.1.17.0-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade jruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback