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.
Published: 2026-11-02
Score: 8.3 High
EPSS: n/a
KEV: No
Impact: Remote Code Execution
Action: Patch Immediately
AI Analysis

Impact

QuickJS‑NG before version 0.16.0 contains an integer overflow in the js_typed_array_sort function that can be triggered by calling TypedArray.prototype.sort with a custom comparator on a typed array approaching two to the thirty‑second elements. The overflow wraps the allocation size, allowing the routine to write indices beyond the intended buffer, which can result in a crash or, if exploited further, execution of arbitrary code on the host. The flaw violates integrity and may provide an attacker with full code‑execution capabilities on 32‑bit systems where the overflow resolves to a smaller allocation.

Affected Systems

Any installation of QuickJS‑NG with a version earlier than 0.16.0 that runs on a 32‑bit host is vulnerable. The vulnerability is tied to the QuickJS‑NG library itself and does not depend on specific operating system distributions or client platforms; any application that embeds or interprets JavaScript via this library can be affected.

Risk and Exploitability

The CVSS score of 8.3 indicates a high‑severity flaw, while the EPSS score is not publicly available, leaving the likelihood of exploitation uncertain but not negligible. The vulnerability is not yet listed in CISA’s KEV catalog. An attacker must be able to execute arbitrary JavaScript within the context of the vulnerable QuickJS‑NG instance; typical vectors include malicious web pages or scripts loaded into a vulnerable application. Once the attacker can run such code, they can trigger the heap buffer overflow and potentially gain code‑execution rights.

Generated by OpenCVE AI on November 2, 2026 at 15:24 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade QuickJS‑NG to version 0.16.0 or later to remove the integer‑overflow + heap‑overflow flaw.
  • If an upgrade is not immediately possible, constrain the use of TypedArray.prototype.sort by removing custom comparator functions or by wrapping the call in a security‑controlled environment that limits input size.
  • Implement an application‑level guard that validates a typed array’s length before sorting; reject or truncate arrays that approach the 2^30 element boundary to prevent the overflow.

Generated by OpenCVE AI on November 2, 2026 at 15:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 02 Nov 2026 14:30:00 +0000

Type Values Removed Values Added
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.
Title QuickJS-NG before 0.16.0 Heap Buffer Overflow via TypedArray.prototype.sort
First Time appeared Quickjs Project
Quickjs Project quickjs
Weaknesses CWE-190
CPEs cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:*
Vendors & Products Quickjs Project
Quickjs Project quickjs
References
Metrics cvssV3_1

{'score': 7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:H'}

cvssV4_0

{'score': 8.3, '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'}


Subscriptions

Quickjs Project Quickjs
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-11-02T14:29:01.345Z

Reserved: 2026-11-02T12:42:15.449Z

Link: CVE-2026-120439

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-11-02T15:17:25.937

Modified: 2026-11-02T19:34:23.993

Link: CVE-2026-120439

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-02T15:30:14Z

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound