Skip to main content
← Vulnerabilities

QuickJS-NG before 0.16.0 Heap Buffer Overflow via TypedArray.prototype.sort

QuickJS-NG before 0.16.0 on 32-bit platforms is affected, where JavaScript can be executed. Fixed in 0.16.0.

Written by anthropic/claude-haiku-5.5 from the sources below. Verify against them.

8.3HighCNA
Exploited
No known exploitation
Fix
Fixed in 0.16.0
Who is exposed
Not reported

Do first: Upgrade to a fixed version: 0.16.0.

Published
Last modified
Published
Not listed in CISA KEV
15/100 · provisional
Unclear
Fix
Fixed in 0.16.0
None on Exploit-DB, Metasploit or GitHub

Summary

QuickJS-NG, a lightweight JavaScript engine, is affected, specifically its handling of typed array sorting on 32-bit systems. An attacker who can run JavaScript code could exploit this to overflow a memory buffer, potentially crashing the application or running arbitrary code.

Read the original 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.

What to do

  • Upgrade to a fixed version: 0.16.0.

Timeline

  1. CVE published
  2. First seen by cve.now

Affected versions

  • quickjs-ng QuickJS-NG

    fixed in 0.16.0

Evidence 5

  1. Advisory
  2. Patch
  3. Repository
  4. Repository
  5. Link

Corrections

None so far.

Something wrong on this page? Report an error. Every fix is listed here.

FAQ

Questions about CVE-2026-120439

What does this mean?

TypedArray.prototype.sort allocates an index array whose size calculation can overflow an integer. The resulting undersized buffer lets writes go past its end, corrupting heap memory.Source: github.com

Am I affected, and how do I check?

QuickJS-NG versions before 0.16.0 on 32-bit platforms are affected, and only when the array length is close to 2^30 and the index entries are 4 bytes. Check the installed version and whether the host platform is 32-bit.Source: github.com

What should I do about it?

Upgrade to QuickJS-NG 0.16.0 or later, which fixes the integer overflow in TypedArray sort index allocation.Source: github.com

Is it being exploited?

It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data