Skip to content

← Public intelligence

RubyGems package

json

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

6 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. UnratedRubyGemsAmendedPublished

    Ruby JSON: JSON::ResumableParser#partial_value dereferences a freed input buffer and crashes on truncated duplicate-key streams

    CVE-2026-71847 · GHSA-9hj4-r449-hfvc

    Affected
    • RubyGems json >= 2.20.0, <= 2.21.1
    Fixed in
    2.21.2· Vendor fix available
    Issue
    Ruby's JSON native C extension clears the consumed JSON::ResumableParser input buffer but leaves state.start, state.cursor, and state.end pointing into released storage. When partialvalue reconstructs an incomplete object containing duplicate keys, the duplicate-key warning path calls cursorposition, which dereferences those stale pointers. This results in a heap-use-after-free and can terminate the Ruby process. An attacker who can supply JSON stream data to an application using JSON::ResumableParser may cause process termination when the application calls partialvalue on incomplete attacker-controlled input containing duplicate object keys. The issue was reproduced in the native C extension from the official RubyGems releases: JSON 2.20.0 JSON 2.21.0 JSON 2.21.1 The attached evidence demonstrates: an AddressSanitizer-confirmed heap-use-after-free; a native SIGSEGV using the official JSON 2.21.1 RubyGem; an end-to-end loopback TCP attacker/victim reproduction; four…

    Recommended action: Upgrade to 2.21.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. Low, CVSS 3.7RubyGemsPublished

    Ruby json: JSON generator heap buffer overflow when streaming to an IO

    CVE-2026-54696 · GHSA-x2f5-4prf-w687

    Affected
    • RubyGems json >= 2.9.0, < 2.19.9
    Fixed in
    2.19.9· Vendor fix available
    Issue
    JSON.dump(obj, io) and JSON::State#generate(obj, io) can write past the internal JSON generator buffer when a streamed object contains an attacker-controlled string near 16 KB. The issue is a heap out-of-bounds write in the IO-streaming path and is demonstrated as a reliable process crash / denial of service. This was triaged on HackerOne as report #3785370. The issue was confirmed there and I was asked to open it here. Details Root cause is in ext/json/fbuffer/fbuffer.h, fbufferdoinccapa(). On the IO path, the buffer is grown to FBUFFERIOBUFFERSIZE (16383), but the early return checks total capacity instead of remaining capacity: If fb-len already contains JSON syntax bytes, and a string flush has 16383 - fb-len <= requested < 16383, this check returns even though there is not enough space left. fbufferappendreserved() then writes past the buffer: The minimal fix is to compare against the remaining capacity: PoC Verified results: Control: the same data through…

    Recommended action: Upgrade to 2.19.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. High, CVSS 8.3RubyGemsPublished

    Ruby JSON has a format string injection vulnerability

    CVE-2026-33210 · GHSA-3m6g-2423-7cp3

    Affected
    • RubyGems json >= 2.18.0, < 2.19.2; >= 2.16.0, < 2.17.1.2; >= 2.14.0, < 2.15.2.1
    Fixed in
    2.17.1.22.15.2.12.19.2· Vendor fix available
    Issue
    Impact A format string injection vulnerability than that lead to denial of service attacks or information disclosure, when the allowduplicatekey: false parsing option is used to parse user supplied documents. This option isn't the default, if you didn't opt-in to use it, you are not impacted. Patches Patched in 2.19.2. Workarounds The issue can be avoided by not using the allowduplicatekey: false parsing option.

    Recommended action: Upgrade to 2.19.2, 2.17.1.2 or 2.15.2.1 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. High, CVSS 7.5RubyGemsPublished

    Out-of-bounds Read in Ruby JSON Parser

    CVE-2025-27788 · GHSA-9m3q-rhmv-5q44

    Affected
    • RubyGems json >= 2.10.0, <= 2.10.1
    Fixed in
    2.10.2· Vendor fix available
    Issue
    Impact A specially crafted document could cause an out of bound read, most likely resulting in a crash. Versions 2.10.0 and 2.10.1 are impacted. Older versions are not. Patches Version 2.10.2 fixes the problem. Workarounds None.

    Recommended action: Upgrade to 2.10.2 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. High, CVSS 7.5RubyGemsPublished

    Unsafe object creation in json RubyGem

    CVE-2020-10663 · GHSA-jphg-qwrw-7w9g

    Affected
    • RubyGems json < 2.3.0
    Fixed in
    2.3.0· Vendor fix available
    Issue
    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.

    Recommended action: Upgrade to 2.3.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  6. UnratedRubyGemsPublished

    JSON gem has Improper Input Validation vulnerability

    CVE-2013-0269 · GHSA-x457-cw4h-hq5f

    Affected
    • RubyGems json < 1.5.5; >= 1.6.0, < 1.6.8; >= 1.7.0, < 1.7.7
    Fixed in
    1.6.81.7.71.5.5· Vendor fix available
    Issue
    The JSON gem before 1.5.5, 1.6.x before 1.6.8, and 1.7.x before 1.7.7 for Ruby allows remote attackers to cause a denial of service (resource consumption) or bypass the mass assignment protection mechanism via a crafted JSON document that triggers the creation of arbitrary Ruby symbols or certain internal objects, as demonstrated by conducting a SQL injection attack against Ruby on Rails, aka "Unsafe Object Creation Vulnerability."

    Recommended action: Upgrade to 1.7.7, 1.6.8 or 1.5.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →