Unsafe object creation in json RubyGem
Published 27 Jul 2020 · Updated 8 Mar 2024
Is your project on an affected json?
Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <2.3.0
- Fixed in
- 2.3.0
bundle update --conservative json # Gemfile: '>= 2.3.0'Details
The JSON gem through 2.2.0 for Ruby, as used in Ruby 2.4 through 2.4.9, 2.5 through 2.5.7, and 2.6 through 2.6.5, has an Unsafe Object Creation Vulnerability. This is quite similar to CVE-2013-0269/GHSA-x457-cw4h-hq5f, but does not rely on poor garbage-collection behavior within Ruby. Specifically, use of JSON parsing methods can lead to creation of a malicious object within the interpreter, with adverse effects that are application-dependent.
Is GHSA-jphg-qwrw-7w9g in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected json, and gives you the command that fixes it.
More advisories for json
- LowCVE-2026-71847Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams · 7 Aug 2026
- LowCVE-2026-54696Ruby json: JSON generator heap buffer overflow when streaming to an IO · 23 Jul 2026
- HighCVE-2026-33210Ruby JSON has a format string injection vulnerability · 19 Mar 2026
- HighCVE-2025-27788Out-of-bounds Read in Ruby JSON Parser · 12 Mar 2025
- HighCVE-2013-0269JSON gem has Improper Input Validation vulnerability · 24 Oct 2017
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2020-10663
- Linkwww.ruby-lang.org/en/news/2020/03/19/json-dos-cve-2020-10663
- Linkwww.debian.org/security/2020/dsa-4721
- Linksupport.apple.com/kb/HT211931
- Linksecurity.netapp.com/advisory/ntap-20210129-0003
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NK2PBXWMFRUD7U7Q7LHV4KYLYID77RI4
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/F4TNVTT66VPRMX5UZYSDGSVRXKKDDDU5
- Linklists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7QL6MJD2BO4IRJ5CJFNMCDYMQQFT24BJ
- Linklists.debian.org/debian-lts-announce/2020/04/msg00030.html
- Linklists.apache.org/thread.html/ree3abcd33c06ee95ab59faa1751198a1186d8941ddc2c2562c12966c@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/rec8bb4d637b04575da41cfae49118e108e95d43bfac39b7b698ee4db@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/rd9b9cc843f5cf5b532bdad9e87a817967efcf52b917e8c43b6df4cc7@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/rb2b981912446a74e14fe6076c4b7c7d8502727ea0718e6a65a9b1be5@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/rb023d54a46da1ac0d8969097f5fecc79636b07d3b80db7b818a5c55c@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/r8d2e174230f6d26e16c007546e804c343f1f68956f526daaafa4aaae@%3Cdev.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/r5f17bfca1d6e7f4b33ae978725b2fd62a9f1b3111696eafa9add802d@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/r3b04f4e99a19613f88ae088aa18cd271231a3c79dfff8f5efa8cda61@%3Cissues.zookeeper.apache.org%3E
- Linklists.apache.org/thread.html/r37c0e1807da7ff2bdd028bbe296465a6bbb99e2320dbe661d5d8b33b@%3Cissues.zookeeper.apache.org%3E
- Linkgithub.com/rubysec/ruby-advisory-db/blob/master/gems/json/CVE-2020-10663.yml
- Linkgithub.com/flori/json/blob/master/CHANGES.md#2019-12-11-230
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.