{"id":"CVE-2026-120439","kind":"vulnerability","aliases":["CVE-2026-120439"],"related":[],"title":"QuickJS-NG: integer overflow in typed array sort lets scripts corrupt memory","description":"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.","summary":"QuickJS-NG before 0.16.0 has an integer overflow in js_typed_array_sort() that wraps an allocation size on 32-bit hosts. A script calling TypedArray.prototype.sort with a comparator on a huge typed array can write past a heap buffer, crashing the engine or possibly running code.","severity":"high","cvss":8.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["32-bit","embedded-js","quickjs-ng","runtime"],"not_affected_if":["64-bit-host","trusted-scripts-only","version-0.16.0-or-later"],"how_to_check":"- Check the QuickJS-NG version embedded in your project, for example in `package.json` or vendored `quickjs.c`, against `0.16.0`.\n- Check whether you run QuickJS-NG on a 32-bit host and whether untrusted JavaScript can reach it.","fix":"- Move QuickJS-NG to `0.16.0` or later.","status":"open","published_at":"2026-11-02T15:17:25+00:00","first_seen_at":"2026-11-02T15:24:02+00:00","triaged_at":"2026-11-02T15:26:01+00:00","updated_at":"2026-11-02T15:26:01+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-11-02T15:26:01Z","model":"claude-haiku-5-5","output":{"fix":"- Move QuickJS-NG to `0.16.0` or later.","reach":"unknown","title":"QuickJS-NG: integer overflow in typed array sort lets scripts corrupt memory","impact":"high","summary":"QuickJS-NG before 0.16.0 has an integer overflow in js_typed_array_sort() that wraps an allocation size on 32-bit hosts. A script calling TypedArray.prototype.sort with a comparator on a huge typed array can write past a heap buffer, crashing the engine or possibly running code.","audience":"developers","category":"runtime","nicknames":[],"who_cares":["quickjs-ng","embedded-js","32-bit"],"confidence":0.7,"fix_status":"available","needs_auth":"no","worst_case":"heap memory corruption leading to crash or possible code execution","analyst_note":"","how_to_check":"- Check the QuickJS-NG version embedded in your project, for example in `package.json` or vendored `quickjs.c`, against `0.16.0`.\n- Check whether you run QuickJS-NG on a 32-bit host and whether untrusted JavaScript can reach it.","plain_action":"","needs_analyst":false,"not_affected_if":["64-bit-host","trusted-scripts-only","version-0.16.0-or-later"],"who_is_affected":"Teams embedding QuickJS-NG before 0.16.0 on 32-bit hosts, especially where untrusted JavaScript can run. Systems on 64-bit hosts or that run only trusted scripts are less exposed. The sources do not say whether other QuickJS builds are affected.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.00072,"input_tokens":4248,"output_tokens":590,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-120439':16A,19A '-2026':15A,18A '0.16.0':33B,81C '2':122C '30':123C '32':20B,49B,103C 'alloc':46B,127C 'allow':94C 'array':8A,41B,63B,89C,120C 'attack':95C,106C 'bit':21B,50B,104C 'buffer':69B,100C,134C 'call':54B,112C 'caus':97C 'code':76B,140C 'compar':58B,116C 'contain':82C 'corrupt':12A 'crash':70B,136C 'cve':14A,17A 'element':124C 'embed':23B 'embedded-j':22B 'engin':72B 'execut':139C 'heap':68B,99C 'host':51B,105C 'huge':61B 'indic':131C 'integ':4A,36B,84C 'javascript':110C 'js':24B,39B,87C 'let':10A 'memori':13A 'near':121C 'ng':3A,27B,31B,79C 'overflow':5A,37B,85C,101C 'past':66B,132C 'possibl':74B 'potenti':138C 'quickj':2A,26B,30B,78C 'quickjs-ng':1A,25B,29B,77C 'quickjs.c':92C 'run':75B,109C 'runtim':28B 'script':11A,53B 'size':47B,128C 'sort':9A,42B,90C 'type':7A,40B,62B,88C,119C 'typedarray.prototype.sort':55B,113C 'wrap':44B,125C 'write':65B,130C","nicknames":[],"mitigations":[],"who_affected":"Teams embedding QuickJS-NG before 0.16.0 on 32-bit hosts, especially where untrusted JavaScript can run. Systems on 64-bit hosts or that run only trusted scripts are less exposed. The sources do not say whether other QuickJS builds are affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["32bit","embeddedjs","high","quickjsng","runtime"],"first_public_at":"2026-07-31T15:04:57+00:00","kev":null,"cvss_vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-120439","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-120439","severity":null,"published_at":"2026-11-02T15:17:25+00:00","modified_at":"2026-11-02T15:17:25+00:00","first_seen_at":"2026-11-02T15:24:02+00:00","fetched_at":"2026-11-02T15:24:02+00:00","note":null}],"documents":[{"id":52464,"url":"https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":52461,"url":"https://github.com/quickjs-ng/quickjs/releases/tag/v0.16.0","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"},{"id":52466,"url":"https://github.com/quickjs-ng/quickjs/security/advisories/GHSA-9wv5-5cgr-grj6","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-07-31T15:04:57+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"},{"id":52467,"url":"https://www.vulncheck.com/advisories/quickjs-ng-before-0.16.0-heap-buffer-overflow-via-typedarray-prototype-sort","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}