Heap out-of-bounds read in js_typed_array_indexOf in QuickJS
Key facts
- Attack vector
- Adjacent network
- Privileges required
- Low
- User interaction
- Passive
- Attack complexity
- High
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- High · Low · Low
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
A vulnerability stemming from floating-point arithmetic precision errors exists in the QuickJS engine's implementation of TypedArray.prototype.indexOf() when a negative fromIndex argument is supplied. * The fromIndex argument (read as a double variable, $d$) is used to calculate the starting position for the search. * If d is negative, the index is calculated relative to the end of the array by adding the array's length (len) to d: $$d_{new} = d + \text{len}$$ * Due to the inherent limitations of floating-point arithmetic, if the negative value $d$ is extremely small (e.g., $-1 \times 10^{-20}$), the addition $d + \text{len}$ can result in a loss of precision, yielding an outcome that is exactly equal to $\text{len}$. * The result is then converted to an integer index $k$: $k = \text{len}$. * The search function proceeds to read array elements starting from index $k$. Since valid indices are $0$ to $\text{len}-1$, starting the read at index $\text{len}$ is one element past the end of the array. This allows an attacker to cause an Out-of-Bounds Read of one element immediately following the buffer. While the scope of this read is small (one element), it can potentially lead to Information Disclosure of adjacent memory contents, depending on the execution environment.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA QuickJS (QuickJS) Fixed in 2025-09-13
Fixed in the same release
Records fixed by the same vendor advisory or release, as the CNA lists them.
- Release ·
QuickJS 2025-09-13
7 records Highest priority Priority HIGH 4 HIGH, 3 MEDIUM
Other records, highest priority first
- TI-2025-38733 Use-after-free in js_std_promise_rejection_check in QuickJSPriority HIGH 73
- TI-2025-38738 Integer overflow in js_bigint_from_string in QuickJSPriority HIGH 66
- TI-2025-38737 Type confusion in string addition in QuickJSPriority HIGH 66
Timeline
- 2026-10-02 Threatist record created from CVE-2025-62492
- 2026-10-03 Alias added: GHSA-7x74-j54q-cmv6
References
More Quickjs vulnerabilities
- TI-2025-38733 Use-after-free in js_std_promise_rejection_check in QuickJS CVSS 4.0HIGH 8.8
- TI-2025-42911 A crafted JavaScript input executed with the QuickJS release 2025-09-13, fixed in commit… CVSS 3.1HIGH 7.5
- TI-2025-29366 quickjs-ng through 0.9.0 has an incorrect size calculation in JS_ReadBigInt for a BigInt… CVSS 3.1HIGH 8.4
- TI-2025-38738 Integer overflow in js_bigint_from_string in QuickJS CVSS 4.0HIGH 7.1
- TI-2025-38737 Type confusion in string addition in QuickJS CVSS 4.0HIGH 7.1
- TI-2025-38736 Type confusion in string addition in QuickJS CVSS 4.0HIGH 7.1
Sources
- CVE-2025-62492 · CVE Program
- CVE-2025-62492 · NVD
- FIRST EPSS
- GHSA-7x74-j54q-cmv6 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences