oj is vulnerable to Out-of-bounds Write
86
High Risk
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.
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.
oj is vulnerable to Out-of-bounds Write in versions 0.5.0 - 3.17.4.
Upgrade the oj library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant