Oj (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, formattr() 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 rbintern3(). 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.
{
"cna_assigner": "GitHub_M",
"cwe_ids": [
"CWE-125",
"CWE-908"
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54500.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54500.json"
[
{
"target": {
"function": "doc_each_child",
"file": "ext/oj/fast.c"
},
"deprecated": false,
"source": "https://github.com/ohler55/oj/commit/bbde91a679728f94c4492ebc3683f4fa3309049f",
"id": "CVE-2026-54500-82675c90",
"signature_version": "v1",
"digest": {
"length": 1200.0,
"function_hash": "284597157331787676635642163655428374329"
},
"signature_type": "Function"
},
{
"target": {
"file": "ext/oj/fast.c"
},
"deprecated": false,
"source": "https://github.com/ohler55/oj/commit/bbde91a679728f94c4492ebc3683f4fa3309049f",
"id": "CVE-2026-54500-9e9c9ae0",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"199983286002052922226336949817555187647",
"290813575444674564957912598811398070084",
"271029507183312090743660178815946935127",
"308199938926426768246305779344887237622",
"6885124362892250705737505978880690024",
"81609547129286724782708863494701550818",
"154517424393622400832930355085829166007"
]
},
"signature_type": "Line"
},
{
"target": {
"file": "ext/oj/intern.c"
},
"deprecated": false,
"source": "https://github.com/ohler55/oj/commit/bbde91a679728f94c4492ebc3683f4fa3309049f",
"id": "CVE-2026-54500-ff2f811f",
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"105043357863397813553073832242196724327",
"297557402281044860861847509889350267303",
"219133777363428864068704509619736337998",
"262054809358148788235365025216681156325"
]
},
"signature_type": "Line"
}
]
"2026-08-12T16:41:13Z"