Out-of-bounds ReadWeakness · CWE-125

CVE-2026-54592

HIGH · 7.5 CVSS v3.1 Published 2026-07-01
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click 8 weeks old

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.3, Oj::Doc#each_child, when invoked recursively over a deeply nested JSON document, overflows a fixed-size stack buffer and aborts the process, leading to DoS. In a two-step chain in ext/oj/fast.c, doc_each_child increments doc->where past the where_path[MAX_STACK = 100] array with no bounds check and never restores it (the doc->where-- is missing), so calling each_child recursively from inside the yield block drives doc->where beyond the array. On the next entry the function copies the path into the 800-byte stack-local buffer save_path[MAX_STACK] using wlen = doc->where - doc->where_path, so when the previous recursive call left doc->where past where_path[100] the wlen exceeds MAX_STACK and the memcpy overflows save_path on the C stack; because the Oj::Doc parser imposes no JSON nesting-depth limit (relying on a C-stack pressure check), deeply nested attacker input reaches this path. This issue has been fixed in version 3.17.3.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A stack buffer overflow in Oj::Doc#each_child occurs when processing deeply nested JSON due to a missing doc->where-- decrement in ext/oj/fast.c, causing doc->where to exceed MAX_STACK=100 and resulting in memcpy overflow of the 800-byte save_path stack buffer when copying the path.

MitigationUpgrade Oj gem to version 3.17.3 or later; as defense-in-depth, consider imposing JSON nesting-depth limits in application code even though the parser relies on C-stack pressure checks.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check if Oj gem is installed
    Run 'gem list oj' or 'ruby -e "require 'oj'; puts Oj::VERSION"'
    Affected if Oj gem is not present in the Ruby environment
  2. Determine installed Oj version
    Run 'gem list oj' to see the installed version, or check within Ruby: ruby -e "require 'oj'; puts Oj::VERSION"'
    Affected if Version is below 3.17.3 (the fixed release)
  3. Identify code using Oj::Doc each_child or document parsing
    Search Ruby source files for patterns like 'Oj::Doc', 'Oj.load', or 'each_child' that process JSON documents
    Affected if Application code parses JSON documents using Oj and could receive untrusted deeply nested input
  4. Verify JSON input can be controlled by external users
    Review application endpoints or interfaces that accept JSON input (API routes, file uploads, external data feeds) and determine if nested depth is user-controlled
    Affected if Untrusted or external JSON input can reach Oj parsing without depth restrictions
  5. Check for existing JSON depth limits in application code
    Search for gem options like :max_nesting or :depth_limit when calling Oj.parse, or application-level validation of nesting depth
    Affected if No depth limits are enforced on parsed JSON and the application uses vulnerable Oj versions

User is affected if Oj gem version is below 3.17.3 AND the application parses untrusted JSON with Oj::Doc or similar document parsing methods without enforcing depth limits.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade Oj gem to version 3.17.3 or later; as defense-in-depth, consider imposing JSON nesting-depth limits in application code even though the parser relies on C-stack pressure checks.

Recommended fix High confidence

Oj gem version 3.17.3 or later

  1. Check the currently installed Oj gem version by running `gem list oj` or `ruby -e "require 'oj'; puts Oj::VERSION"`
  2. Upgrade the Oj gem to version 3.17.3 or later by running `gem install oj -v '>= 3.17.3'`
  3. If using Bundler, update the Gemfile to specify `gem 'oj', '>= 3.17.3'` and run `bundle update oj`
  4. Verify the upgrade was successful by checking the installed version again
  5. Test the application to ensure the upgrade does not break existing functionality
Caveat Minor - this is a bugfix release addressing a security vulnerability; no breaking API changes are expected for typical usage

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation1.0 h
  • Implementation1.0 h
  • Testing2.0 h
  • Review / QA1.0 h
5.0 hours of engineering $860
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,376.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-54592 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-54592 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data