Intel

AIKIDO-2026-11154

oj is vulnerable to Stack-based Buffer Overflow

Stack-based Buffer OverflowGHSA-3v45-f3vh-wg7m Published Yesterday

31

Low Risk

This Affects:

RUBYoj
0.0.1 - 3.17.1
Fixed in 3.17.2
Are you affected? Scan for Free

TL;DR

The Oj.dump serializer accepts an integer indent option without bounding its magnitude. When an extreme indent value is supplied, fill_indent writes far beyond the stack-allocated output buffer and corrupts the stack. Before the fix, this could crash the Ruby process handling the dump call. The patch rejects indent values above a small fixed maximum.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and untrusted input can influence the indent option passed to Oj.dump.

Background info

oj is vulnerable to Stack-based Buffer Overflow in versions 0.0.1 - 3.17.1.

How to fix this

Upgrade the oj library to the patch version.