{"id":"CVE-2026-120439","summary":"QuickJS-NG before 0.16.0 Heap Buffer Overflow via TypedArray.prototype.sort","details":"QuickJS-NG before 0.16.0 contains an integer overflow in js_typed_array_sort() in quickjs.c that allows attackers to cause a heap buffer overflow on 32-bit hosts. Attackers who can run JavaScript can call TypedArray.prototype.sort with a comparator on a typed array near 2^30 elements, wrapping the allocation size and writing indices past the buffer to crash or potentially execute code.","aliases":["GHSA-9wv5-5cgr-grj6"],"modified":"2026-11-08T07:05:58.720726629Z","published":"2026-11-02T14:29:01.345Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/120xxx/CVE-2026-120439.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-190"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/120xxx/CVE-2026-120439.json"},{"type":"ADVISORY","url":"https://github.com/quickjs-ng/quickjs/releases/tag/v0.16.0"},{"type":"ADVISORY","url":"https://github.com/quickjs-ng/quickjs/security/advisories/GHSA-9wv5-5cgr-grj6"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120439"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/quickjs-ng-before-0.16.0-heap-buffer-overflow-via-typedarray-prototype-sort"},{"type":"FIX","url":"https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568"},{"type":"PACKAGE","url":"https://github.com/quickjs-ng/quickjs"},{"type":"ARTICLE","url":"https://github.com/quickjs-ng/quickjs/blob/v0.15.1/quickjs.c#L60032"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/quickjs-ng/quickjs","events":[{"introduced":"0"},{"fixed":"10b99693cdc3f37cdf05114bc2d5225de495c4a3"},{"fixed":"e93cca611908e12b824ec85fbee6b31a5ee61568"}],"database_specific":{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StandardRange","range":[{"introduced":"0"},{"fixed":"0.16.0"}]},{"range":[{"fixed":"e93cca611908e12b824ec85fbee6b31a5ee61568"}],"source":"REFERENCES_COMMIT"},{"source":"REFERENCES_TAG","original_tag":"v0.16.0","range":[{"fixed":"10b99693cdc3f37cdf05114bc2d5225de495c4a3"}]}]}}],"versions":["v0.15.1","v0.15.0","v0.14.0","v0.13.0","v0.12.1","v0.12.0","v0.11.0","v0.10.1","v0.10.0","v0.9.0","v0.8.0","v0.7.0","v0.6.1","v0.6.0","v0.5.0","v0.4.1","v0.4.0","v0.3.0","v0.2.0","v0.1.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-120439.json","vanir_signatures":[{"signature_type":"Line","signature_version":"v1","source":"https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568","target":{"file":"api-test.c"},"deprecated":false,"digest":{"threshold":0.9,"line_hashes":["15286093769480170670582367845851314640","163603996740099948821642844312771812146","118059557935465979911517266787079872008","159433073696150212746924227183103055031","21294674500470396758303638881997712664","305635793465283903878973068956905112042"]},"id":"CVE-2026-120439-58ebf744"},{"id":"CVE-2026-120439-81d20ada","signature_type":"Function","signature_version":"v1","source":"https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568","target":{"file":"api-test.c","function":"main"},"deprecated":false,"digest":{"length":429,"function_hash":"339672367513411987082251834676199972784"}},{"source":"https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568","target":{"file":"quickjs.c"},"deprecated":false,"digest":{"line_hashes":["35622994652050402364432609390528171","72432646560561520657833473226900174891","44149737373700483082376133087661233687","187762416647858175456888421498465924703"],"threshold":0.9},"id":"CVE-2026-120439-a440d6fb","signature_type":"Line","signature_version":"v1"},{"source":"https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568","target":{"file":"quickjs.c","function":"js_typed_array_sort"},"deprecated":false,"digest":{"function_hash":"134583724803942752108322502447683223025","length":3373},"id":"CVE-2026-120439-a86dfbfa","signature_type":"Function","signature_version":"v1"}],"vanir_signatures_modified":"2026-11-08T07:05:58Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N"}]}