CVE-2020-10663: Unsafe object creation in json RubyGem

json Updated 02 Oct 2025

Summary

27/07/2020
Yes i
High
7.5

CVE-2020-10663: Unsafe object creation in json RubyGem. Affects json versions < 2.3.0. Fixed in 2.3.0. How to fix ↓

Also tracked for

The same CVE-2020-10663 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

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

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The JSON gem is a Ruby library that provides JSON parsing and generation capabilities. It is widely used in Ruby applications for handling JSON data. The vulnerability affects versions 2.2.0 and below of the JSON gem, which are used in Ruby versions 2.4 through 2.4.9, 2.5 through 2.5.7, and 2.6 through 2.6.5. The vulnerability allows for unsafe object creation during JSON parsing, potentially leading to malicious object creation within the interpreter. This vulnerability is similar to CVE-2013-0269/GHSA-x457-cw4h-hq5f but does not rely on poor garbage-collection behavior within Ruby. The impact of this vulnerability depends on the specific application using the JSON gem.

Vulnerability Detail

The JSON gem through 2.2.0 for Ruby has an Unsafe Object Creation Vulnerability. When using JSON parsing methods, a malicious object can be created within the interpreter, which can have adverse effects depending on the application. This vulnerability does not rely on poor garbage-collection behavior within Ruby, making it distinct from a similar vulnerability in the past. The vulnerability has a CVSS score of 7.5.

How To Fix

Latest published version: 3.1.0 as of 23 Oct 2026

gem install json -v 3.1.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.0

This is the first release that contains the fix.

gem install json -v 2.3.0

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

Workaround

There is no known workaround for this vulnerability. It is necessary to upgrade the JSON gem to a fixed version.

Conclusion

The JSON gem through 2.2.0 for Ruby is vulnerable to an Unsafe Object Creation issue. It is recommended to upgrade the gem to version 2.3.0 or above to mitigate the vulnerability. Thorough testing should be performed after the upgrade to ensure compatibility and verify the resolution of the vulnerability. If you need further assistance or support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for json →

Share this vulnerability

FAQ

The impact of this vulnerability depends on the specific application using the JSON gem. It could potentially allow for the creation of malicious objects within the interpreter, leading to various adverse effects.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. Simply upload your manifest file (e.g., package-lock.json) and the tool will provide real-time alerts for open-source vulnerabilities.

Yes, the recommended fix is to upgrade the JSON gem to version 2.3.0 or above. This can be done by updating the gem version in the application's Gemfile and running the bundle update command.

Yes, this vulnerability affects Ruby versions 2.4 through 2.4.9, 2.5 through 2.5.7, and 2.6 through 2.6.5. It is important to upgrade the JSON gem in these versions to address the vulnerability.

Yes, the CVSS score for this vulnerability is 7.5.

Related vulnerabilities

Recent vulnerabilities recorded for json.

How To Fix

Latest published version: 3.1.0 as of 23 Oct 2026

gem install json -v 3.1.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.3.0

This is the first release that contains the fix.

gem install json -v 2.3.0

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