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

CVE-2026-54896: Oj: Heap Buffer Overflow in Oj.dump Exception Serialization via Large Indent

June 19, 2026

Oj.dump in object mode is vulnerable to a heap buffer overflow when serializing Exception objects with a large :indent value. The serializer allocates a buffer sized for the object’s attributes but does not account for the indent bytes added on each write. With indent: 5000, the accumulation of 5,000-byte indent strings overflows the 13,150-byte heap allocation, corrupting adjacent heap memory.

References

  • github.com/advisories/GHSA-35w3-pjm6-wj95
  • github.com/ohler55/oj/security/advisories/GHSA-35w3-pjm6-wj95
  • nvd.nist.gov/vuln/detail/CVE-2026-54896

Code Behaviors & Features

Detect and mitigate CVE-2026-54896 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 before 3.17.3

Fixed versions

  • 3.17.3

Solution

Upgrade to version 3.17.3 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-122: Heap-based Buffer Overflow

Source file

gem/oj/CVE-2026-54896.yml

Spotted a mistake? Edit the file on GitLab.

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

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