{"id":"CVE-2026-54901","published":"2026-06-30T23:36:38Z","modified":"2026-07-01T12:34:23Z","title":"Oj: Use-After-Free in Oj::Parser array_class/hash_class GC Marking","vendor":"ohler55","product":"oj","tier":"tail","description":{"text":"Oj (Optimized JSON) is a JSON parser and Object marshaller packaged as a Ruby gem. In versions prior to 3.17.2, Oj::Parser in usual mode does not mark array_class and hash_class references during garbage collection, leading to Use-After-Free. If GC runs after the class is assigned but before a parse, the class object is reclaimed, leaving the parser holding a dangling VALUE. The subsequent parse call dereferences the freed object, producing a segfault. This issue has been fixed in version 3.17.2.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00407,"percentile":0.35862,"provenance":"source"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"references":[{"url":"https://github.com/ohler55/oj/security/advisories/GHSA-vwm4-62gf-x745","tags":["x_refsource_CONFIRM"]}],"priority":{"score":11.6,"factors":[{"name":"EPSS percentile","points":7.17},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"ohler55","affectedVersions":[{"vendor":"ohler55","product":"oj","versions":["< 3.17.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-01T12:34:19.993948Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"oj","vulnerableRanges":["<3.17.3"],"patched":["3.17.3"],"from":["GHSA-vwm4-62gf-x745"],"provenance":"source"}],"summary":{"text":"The Oj JSON parser and marshaller gem, in Oj::Parser's usual mode before version 3.17.2, fails to mark its array_class and hash_class references during garbage collection, leaving a use-after-free condition. An attacker with network access and no authentication or user interaction can trigger a parse after garbage collection has reclaimed the assigned class, causing the process to dereference freed memory and crash (denial of service), provided the parser is configured to use custom array or hash classes.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:04:56Z"},"euvd":{"id":"EUVD-2026-40856","exploited":false,"provenance":"source"}}