A heap buffer overflow vulnerability exists in Ruby's JSON generator when streaming JSON output to an IO object using JSON.dump(obj, io) or JSON::State#generate(obj, io). The flaw occurs due to incorrect buffer capacity checks, allowing an out-of-bounds write when processing attacker-controlled strings near 16 KB in size. This leads to a reliable denial of service via process crash. The issue affects Ruby JSON versions prior to 1.92.3 and has been fixed in version 1.92.3.