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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| quickjs-ng | QuickJS-NG | < 0.16.0 | 0.16.0 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | quickjs-ng | 0.16.2-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | quickjs-ng | No fix yet | — |
References
- GitHub Security Advisory (GHSA-9wv5-5cgr-grj6) vendor-advisory
- https://github.com/quickjs-ng/quickjs/commit/e93cca611908e12b824ec85fbee6b31a5ee61568 patch
- QuickJS-NG v0.16.0 Release Notes release-notes
- https://github.com/quickjs-ng/quickjs/blob/v0.15.1/quickjs.c#L60032 technical-description
- VulnCheck Advisory: QuickJS-NG before 0.16.0 Heap Buffer Overflow via TypedArray.prototype.sort third-party-advisory