CVE catalog

CVE-2026-54592

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, overflo

[CVE catalog]

Severity
High · CVSS 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Published
Source
[NVD] · [CVE record]
EPSS
0.28% · Oct 25, 2026

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.

Vulnerable and fixed packages

Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.

DistributionPackageReleaseVersionStatus
Debianruby-ojsid3.17.7-1fixed
Debianruby-ojforky3.17.7-1fixed
Debianruby-ojtrixie3.16.3-1vulnerable
Debianruby-ojtrixie-security3.16.3-1+deb13u1fixed
Debianruby-ojbookworm3.14.2-1vulnerable
Debianruby-ojbookworm-security3.14.2-1+deb12u1fixed
Cperuby-ojNot reportedNot reportedvulnerable

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianruby-ojsourcesid3.17.3-1not yet assignedNot reportedNot reported
Debianruby-ojsourceforky3.17.3-1not yet assignedNot reportedNot reported
Debianruby-ojsourcetrixie3.16.3-1+deb13u1not yet assignedNot reportedNot reported
Debianruby-ojsourcebookworm3.14.2-1+deb12u1not yet assignedNot reportedNot reported

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • [ruby-oj]Affected
    Details (2)
    • 3.14.2-1 · amd64 · bookworm

      Affected · Fixed: 3.14.2-1+deb12u1

      nvd · ruby-oj · debian · bookworm; nvd · ruby-oj · debian · 12

    • 3.14.2-1 · arm64 · bookworm

      Affected · Fixed: 3.14.2-1+deb12u1

      nvd · ruby-oj · debian · bookworm; nvd · ruby-oj · debian · 12

[Debian 13 (Trixie)]

  • [ruby-oj]Affected
    Details (3)
    • 3.16.3-1+b5 · amd64 · trixie

      Affected · Fixed: 3.16.3-1+deb13u1

      nvd · ruby-oj · debian · 13

    • 3.16.3-1+b5 · arm64 · trixie

      Affected · Fixed: 3.16.3-1+deb13u1

      nvd · ruby-oj · debian · 13

    • 3.16.3-1+deb13u1 · amd64 · trixie-security

      Fixed · Fixed: 3.16.3-1+deb13u1

      nvd · ruby-oj · debian · 13

Observed:

References