Skip to main content

Use After Free

CVE-2026-54902

Severity High
Score 8.7/10

Summary

`Oj::Parser` in SAJ mode does not protect cached object keys (>= 35 bytes) from garbage collection. A Ruby callback that triggers GC inside `hash_end` can cause the key string to be reclaimed while the C parser still holds a pointer to it. The subsequent access to the freed string VALUE results in a segfault, confirmed by an RIP pointing to address `0x4242` (a canary-style pattern suggesting control over the freed memory's content). This issue affects versions prior to 3.17.3

  • LOW
  • NETWORK
  • NONE
  • NONE

CWE-416 - Use After Free

Use-after-free (UaF) vulnerability occurs when the application is using a pointer to memory that has been freed. Any attempt to read/write to a buffer after it is de-allocated allows memory corruption, sensitive information exposure, and can potentially lead to arbitrary code execution.

References

Advisory Timeline

  • Published