CVE-2026-54500
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.load in :object mode reads uninitialized stack memory (and, for long keys, reads out of bounds) when parsing a JSON object whose key is 254 bytes or longer. The interned bytes can surface to the caller, disclosing process stack memory. In ext/oj/intern.c, form_attr() handles the long-key path by allocating a heap buffer, `b`, populating it with the attribute name, and then freeing it — but it passed the uninitialized stack buffer buf (not b) to rb_intern3(). rb_intern3 therefore reads len + 1 bytes of uninitialized stack memory. When the key length is >= 256, it also reads out of bounds past the 256-byte buf. The resulting bytes are interned and can reach the caller via the produced Symbol or via the EncodingError message raised on invalid UTF-8, leaking process stack contents. 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 confidenceIn Oj Ruby gem versions prior to 3.17.3, the form_attr() function in ext/oj/intern.c has a memory handling bug when parsing JSON objects with keys >=254 bytes. It allocates a heap buffer for the attribute name but incorrectly passes an uninitialized 256-byte stack buffer (buf) to rb_intern3() instead of the heap buffer (b). This causes rb_intern3 to read len+1 bytes of uninitialized stack memory, and for keys >=256 bytes, reads out-of-bounds past buf. The leaked bytes become interned in Ruby Symbols and can be disclosed via those Symbols or EncodingError messages from invalid UTF-8, revealing process stack contents.
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
- Low
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
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 inspect your Gemfile.lock for the oj gem entryAffected if The gem is present and the version listed is below 3.17.3 (e.g., 3.17.2, 3.16.0, etc.)
-
Identify Oj version in useExecute `ruby -e "require 'oj'; puts Oj::VERSION"` to print the loaded gem versionAffected if The reported version is any version prior to 3.17.3
-
Verify Oj.load usage with object modeSearch your codebase for patterns like `Oj.load(..., mode: :object)` or `Oj.load(..., :object)` indicating object mode parsingAffected if Your application calls Oj.load with :object mode enabled on JSON data from untrusted sources
-
Inspect JSON input for long keysIf you log or can inspect processed JSON, check if any object keys are 254 bytes or longerAffected if Your application processes JSON objects containing keys >=254 bytes in length
-
Check for Symbol creation from JSON parsingMonitor Ruby's Symbol table using `Symbol.all_symbols` after Oj.load operations, or review logs for Symbol creation eventsAffected if Symbols are being interned from parsed JSON keys, especially after loading JSON with long attribute names
You are affected if you are running any Oj gem version prior to 3.17.3 and use Oj.load with object mode on JSON input containing keys of 254 bytes or more.
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. If upgrade is not immediately possible, avoid using Oj.load with :object mode on untrusted JSON input containing long keys.
Oj gem version 3.17.3
- Check current Oj gem version with `gem list oj`
- Update the Oj gem to version 3.17.3 or later using `gem install oj -v '>= 3.17.3'`
- If using Bundler, update Gemfile to specify `gem 'oj', '>= 3.17.3'` and run `bundle update oj`
- Verify the fix by testing JSON parsing with keys >= 254 bytes in :object mode to confirm no uninitialized memory is read
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation4.0 h
- Implementation2.0 h
- Testing6.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,872.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-54500 — 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-54500 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