CVE-2026-54903: ohler55 Oj integer overflow in Oj.load heap corruption

CVE-2026-54903 · Severity: high · CVSS 4 · Published 2026-07-01

Oj is a high-performance tool used by Ruby applications to process and translate JSON data. A security flaw allows an attacker to crash an application or corrupt its memory by sending an extremely large JSON string (over 2 GB). This could lead to service outages or unpredictable application behavior.

Technologies: oj (RubyGems). Vendors: RubyGems.

Quick answers

Is CVE-2026-54903 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-54903 being exploited in the wild.
How severe is CVE-2026-54903?
High severity, with a CVSS score of 4, published 1 July 2026.
Which products and versions are affected?
oj (RubyGems) < 3.17.2, ECOSYSTEM:introduced=0,fixed=3.17.3.
Is there a fix for CVE-2026-54903?
Yes. oj (RubyGems): upgrade to 3.17.3 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-54903 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-54903?
Check whether you run oj (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • oj (RubyGems): upgrade to 3.17.3 or later
    bundle update oj

Technical details

An integer overflow exists in the `read_escaped_str` function within `parse.c` when calculating string length. When a JSON string exceeds 2 GB, the length calculation wraps to a negative value, which is then cast to a large `size_t` in `buf_append_string` (buf.h). This results in an out-of-bounds `memcpy` operation, leading to heap corruption or an immediate process crash (DoS). The vulnerability is reachable via the `Oj.load` method and has been addressed in version 3.17.2.

Affected products

  • ohler55 oj < 3.17.2

Identifiers

  • CVE-2026-54903
  • GHSA-475m-ph3x-64gp

Timeline

  • 2026-06-16: advisory: GitHub security advisory published
  • 2026-06-30: patched: Fix released in version 3.17.2
  • 2026-07-01: disclosed: NVD publication date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.