Intel

AIKIDO-2026-662560

oj is vulnerable to Out-of-bounds Write

Out-of-bounds Write Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

86

High Risk

This Affects:

RUBYoj
0.5.0 - 3.17.4
Fixed in 3.17.5
Are you affected? Scan for Free

TL;DR

The native C extension that powers oj parsing and dumping contains multiple memory-safety defects reachable when it processes untrusted JSON or serializes Ruby objects. Crafted input such as unterminated strings, oversized or deeply nested keys, malformed numbers, and truncated documents triggers buffer over-reads, out-of-bounds writes, use-after-free, double free, type confusion, and reads of uninitialized memory. Before the fix these flaws can crash the process, leak adjacent or uninitialized memory into output and error messages, and corrupt heap or stack memory. The fix adds bounds and type checks, seeds the key hash per process, corrects length arithmetic, and repoints or protects freed objects across the parser and dumper.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use oj to parse or dump untrusted or externally influenced JSON or Ruby objects.

Background info

oj is vulnerable to Out-of-bounds Write in versions 0.5.0 - 3.17.4.

How to fix this

Upgrade the oj library to the patch version.