Skip to content
Heist/ feed
Back to feed
Low

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

Type: advisorySources: OSV

Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO 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. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-54696
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:45 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 30 Jun 2026, 22:05 UTC

Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO 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. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.

osv:CVE-2026-54696
Complete source record
{
  "id": "f9b7f92cd7cdb6ddbbbb7b879d76c6ab63dde5f1ff2f967cfac009a3bea39cd2",
  "url": "https://osv.dev/vulnerability/CVE-2026-54696",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Ruby JSON: JSON generator heap buffer overflow when streaming to an IO",
    "summary": "Ruby JSON is a JSON implementation for Ruby. Versions 2.9.0 through 2.19.8 are vulnerable to heap buffer overflow when the JSON generator is provided with an oversized streamed object. When streaming to an IO 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. Exploitation would result in a reliable process crash/denial of service. This issue has been fixed in version 2.19.9.",
    "evidence": "osv:CVE-2026-54696",
    "products": [],
    "severity": "low",
    "structured": {
      "id": "CVE-2026-54696",
      "aliases": [
        "CVE-2026-54696",
        "GHSA-x2f5-4prf-w687"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ruby/json",
              "type": "GIT",
              "events": [
                {
                  "introduced": "20b501a31d824449148c97385eb064f6f62ba127"
                },
                {
                  "last_affected": "5233dd9b851a4924f793aec1a1658ed8b66a34c7"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "2.9.0"
                      },
                      {
                        "last_affected": "2.19.8"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.19.8",
            "v2.19.7",
            "v2.19.6",
            "v2.19.5",
            "v2.19.4",
            "v2.19.2",
            "v2.15.2",
            "v2.17.1",
            "v2.19.1",
            "v2.19.0",
            "v2.18.1",
            "v2.18.0",
            "v2.17.0",
            "v2.16.0",
            "v2.15.1",
            "v2.15.0",
            "v2.14.1",
            "v2.14.0",
            "v2.13.2",
            "v2.13.1",
            "v2.13.0",
            "v2.12.2",
            "v2.12.1",
            "v2.12.0",
            "v2.11.3",
            "v2.11.2",
            "v2.11.1",
            "v2.11.0",
            "v2.10.2",
            "v2.10.1",
            "v2.10.0",
            "v2.9.1",
            "v2.9.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54696.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.411959123Z",
      "provider": "osv",
      "references": [
        "https://github.com/ruby/json/releases/tag/v2.19.9",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54696.json",
        "https://github.com/ruby/json/security/advisories/GHSA-x2f5-4prf-w687",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-54696"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-122",
          "CWE-131",
          "CWE-787"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "2.9.0"
                  },
                  {
                    "fixed": "2.19.9"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StringRangeExpression"
              }
            ]
          },
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "fixed": "2.19.9"
                  }
                ],
                "source": "DESCRIPTION"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54696.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-54696",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504880,
  "published_at": "2026-06-30T22:05:48.347+00:00"
}