PT-2026-51084 · Rubygems · Oj

Published

2026-06-19

·

Updated

2026-06-19

·

CVE-2026-54898

CVSS v4.0

8.7

High

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Name of the Vulnerable Software and Affected Versions oj gem (affected versions not specified)
Description A heap use-after-free occurs in Oj::Parser#parse when a SAJ/SAJ2 callback mutates the input JSON string during the parsing process. The C engine maintains a raw pointer to the Ruby string's internal buffer. If a callback, such as hash start(), resizes the string (for example, via String#replace), Ruby reallocates the buffer and frees the original memory. This leaves the C parser with a dangling pointer, leading to a use-after-free when the next character is read.
Recommendations At the moment, there is no information about a newer version that contains a fix for this vulnerability.

Use After Free

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-54898
GHSA-Q2GM-54R6-8FWM

Affected Products

Oj