Summary
QuickJS-NG before 0.16.0 contains an integer overflow in js_proxy_get_own_property_names() in quickjs.c that causes a heap buffer overflow on 32-bit hosts. Attackers running JavaScript can return a large array-like object from a Proxy ownKeys trap to wrap the allocation size, causing crashes or potential code execution.
Remediation
References
- Patchhttps://github.com/quickjs-ng/quickjs/commit/252209d99cf112568160548bdcaa98d95e0d0068
- Advisoryhttps://github.com/quickjs-ng/quickjs/security/advisories/GHSA-jp52-chwg-2p9p
- Advisoryhttps://www.vulncheck.com/advisories/quickjs-ng-before-0.16.0-heap-buffer-overflow-via-proxy-ownkeys-enumeration
- Referencehttps://github.com/quickjs-ng/quickjs/blob/v0.15.1/quickjs.c#L51509
- Referencehttps://github.com/quickjs-ng/quickjs/releases/tag/v0.16.0