Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. json
  4. ›
  5. CVE-2026-54696

CVE-2026-54696: Ruby json: JSON generator heap buffer overflow when streaming to an IO

July 23, 2026

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.

References

  • github.com/advisories/GHSA-x2f5-4prf-w687
  • github.com/ruby/json/commit/996bac686d64e4e3aaeae03b14a7f9ee9695ebdb
  • github.com/ruby/json/releases/tag/v2.19.9
  • github.com/ruby/json/security/advisories/GHSA-x2f5-4prf-w687
  • github.com/rubysec/ruby-advisory-db/blob/master/gems/json/CVE-2026-54696.yml
  • nvd.nist.gov/vuln/detail/CVE-2026-54696

Code Behaviors & Features

Detect and mitigate CVE-2026-54696 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.9.0 before 2.19.9

Fixed versions

  • 2.19.9

Solution

Upgrade to version 2.19.9 or above.

Impact 3.7 LOW

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L

Learn more about CVSS

Weakness

  • CWE-122: Heap-based Buffer Overflow
  • CWE-131: Incorrect Calculation of Buffer Size
  • CWE-787: Out-of-bounds Write

Source file

gem/json/CVE-2026-54696.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:21 +0000.