CVE-2026-54592
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 · uneditedOj (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 confidenceA 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.
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 checksWork through these to decide whether this CVE applies to you.
-
Check if Oj gem is installedRun 'gem list oj' or 'ruby -e "require 'oj'; puts Oj::VERSION"'Affected if Oj gem is not present in the Ruby environment
-
Determine installed Oj versionRun '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)
-
Identify code using Oj::Doc each_child or document parsingSearch Ruby source files for patterns like 'Oj::Doc', 'Oj.load', or 'each_child' that process JSON documentsAffected if Application code parses JSON documents using Oj and could receive untrusted deeply nested input
-
Verify JSON input can be controlled by external usersReview application endpoints or interfaces that accept JSON input (API routes, file uploads, external data feeds) and determine if nested depth is user-controlledAffected if Untrusted or external JSON input can reach Oj parsing without depth restrictions
-
Check for existing JSON depth limits in application codeSearch for gem options like :max_nesting or :depth_limit when calling Oj.parse, or application-level validation of nesting depthAffected 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.
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 · scopedUpgrade 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.
Oj gem version 3.17.3 or later
- Check the currently installed Oj gem version by running `gem list oj` or `ruby -e "require 'oj'; puts Oj::VERSION"`
- Upgrade the Oj gem to version 3.17.3 or later by running `gem install oj -v '>= 3.17.3'`
- If using Bundler, update the Gemfile to specify `gem 'oj', '>= 3.17.3'` and run `bundle update oj`
- Verify the upgrade was successful by checking the installed version again
- Test the application to ensure the upgrade does not break existing functionality
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
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 locallyCheck 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-54592 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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