{"id":"CVE-2026-126366","summary":"msgpack-java JRuby decoder allocates from declared header counts with no cap: 5-byte message forces multi-GiB OOM","details":"MessagePack for Ruby is an implementation of the MessagePack binary serialization format. Prior to 1.8.7, the Java-platform msgpack gem for JRuby allocated arrays and byte buffers directly from attacker-controlled array32, str32, and bin32 declared sizes before confirming that corresponding elements or bytes were available. A short MessagePack header could therefore trigger a very large allocation or sustained heap growth when an application decoded untrusted input through MessagePack.unpack or MessagePack::Unpacker, potentially exhausting the shared JVM heap. map32 and declared counts at or above 2^31 did not use the affected allocation behavior. This issue is fixed in version 1.8.7.","aliases":["GHSA-73v3-wf97-vpgj"],"modified":"2026-11-15T07:04:25.966336812Z","published":"2026-11-12T22:41:38.409Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/126xxx/CVE-2026-126366.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-1325","CWE-770"]},"references":[{"type":"WEB","url":"https://github.com/msgpack/msgpack-ruby/releases/tag/v1.8.6"},{"type":"WEB","url":"https://github.com/msgpack/msgpack-ruby/releases/tag/v1.8.7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/126xxx/CVE-2026-126366.json"},{"type":"ADVISORY","url":"https://github.com/msgpack/msgpack-ruby/security/advisories/GHSA-73v3-wf97-vpgj"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126366"},{"type":"FIX","url":"https://github.com/msgpack/msgpack-ruby/commit/ca0efc1256c687b428c46dd68ce000ff515d53f2"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/msgpack/msgpack-ruby","events":[{"introduced":"0"},{"fixed":"2c6a131c54f08eba17600b155c473630ef675499"},{"fixed":"ca0efc1256c687b428c46dd68ce000ff515d53f2"},{"fixed":"2c34bb7bf3ef1ba7a98482346cf08930a722f8e6"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StringRangeExpression","range":[{"introduced":"0"},{"fixed":"1.8.7"}]},{"range":[{"fixed":"ca0efc1256c687b428c46dd68ce000ff515d53f2"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"v1.8.6","range":[{"fixed":"2c34bb7bf3ef1ba7a98482346cf08930a722f8e6"}]},{"original_tag":"v1.8.7","range":[{"fixed":"2c6a131c54f08eba17600b155c473630ef675499"}],"source":"REFERENCES_TAG"}]}}],"versions":["v1.8.5","v1.8.4","v1.8.3","v1.8.2","v1.8.1","v1.8.0","v1.7.5","v1.7.4","v1.7.3","v1.7.2","v1.7.1","v1.7.0","v1.6.1","v1.6.0","v1.5.6","v1.5.5","v1.5.4","v1.5.3","v1.5.2","v1.5.1","v1.5.0","v1.4.5","v1.4.4","v1.4.3","v1.4.2","v1.4.1","v1.4.0","v1.3.3","v1.3.2","v1.3.1","v1.3.0","v1.2.10","v1.2.9","v1.2.8","v1.2.7","v1.2.6","v1.2.5","v1.2.4","v1.2.3","v1.2.2","v1.2.1","v1.2.0","v1.1.0","v1.0.3","v1.0.2","v1.0.1","v1.0.0","v0.7.6","v0.7.5","v0.7.4","v0.7.3","v0.7.2","v0.7.1","v0.7.0","v0.6.2","v0.6.1","v0.6.0","v0.6.0pre1","v0.5.11","v0.5.10","v0.5.9","v0.5.8","v0.5.7","v0.5.6","v0.5.5","v0.5.4","v0.5.3","v0.5.2","v0.5.1","v0.5.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-126366.json","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/msgpack/msgpack-ruby/commit/ca0efc1256c687b428c46dd68ce000ff515d53f2","target":{"file":"ext/java/org/msgpack/jruby/Decoder.java"},"deprecated":false,"digest":{"line_hashes":["54927725416530866243951887124767984367","134970290993774556978567597115381166130","308264499607947257995829357700784689140","133846026758294595400698042823979804544","243855173323605297802198047256245770065","171374835979682720757892675657509403617","13402554709558044052909711073804515403","87836174382097487655976347822600118402","95464967614303511578184240904208747003","205535499682540333227413655277277231380","215130117258364151829134721863586952758","261379847508576876488106029894664459343","12933672250495513179424765974269375762","306895746127107003356964820202755808540"],"threshold":0.9},"id":"CVE-2026-126366-c33faab3","signature_type":"Line"},{"signature_version":"v1","source":"https://github.com/msgpack/msgpack-ruby/commit/ca0efc1256c687b428c46dd68ce000ff515d53f2","target":{"function":"consumeArray","file":"ext/java/org/msgpack/jruby/Decoder.java"},"deprecated":false,"digest":{"length":182,"function_hash":"178639222958506949545380035712525102559"},"id":"CVE-2026-126366-d7f5c740","signature_type":"Function"},{"id":"CVE-2026-126366-f95c19c9","signature_type":"Function","signature_version":"v1","source":"https://github.com/msgpack/msgpack-ruby/commit/ca0efc1256c687b428c46dd68ce000ff515d53f2","target":{"file":"ext/java/org/msgpack/jruby/Decoder.java","function":"readBytes"},"deprecated":false,"digest":{"function_hash":"194971547348508181546887268304836461591","length":112}}],"vanir_signatures_modified":"2026-11-15T07:04:25Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}]}