QuickJS
CVE-2025-62492
MEDIUM
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDeliver crafted JS to QuickJS host
-
DeliveryCall indexOf with tiny negative fromIndex
-
ExploitFloat rounding sets start index to len
-
ExecutionEngine reads one element past buffer
-
ImpactLeak adjacent memory to script
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the ability to execute attacker-controlled JavaScript within an application embedding the vulnerable QuickJS engine, and the specific trigger is a call to TypedArray.prototype.indexOf() with a negative fromIndex argument whose magnitude is extremely small (e.g. -1e-20), such that floating-point addition of fromIndex+length rounds exactly to length. Limiting factors: the attacker must already be able to run script in the engine; impact is bounded to a single out-of-bounds element read (information disclosure only, no write or code execution); and whether the leak is observable and useful depends on the host environment's memory layout and how it exposes engine output. The supplied CVSS 4.0 vector additionally posits adjacent-network reach (AV:A), high complexity (AC:H), a present attack requirement (AT:P), low privileges (PR:L), and passive user interaction (UI:P), but these are deployment-dependent for an embeddable library. |
| Impact | This is a genuine but low-to-moderate priority issue, and the signals are mostly consistent in pointing to limited real-world risk despite the presence of public exploit code. The CVSS 4.0 vector (AV:A/AC:H/AT:P/PR:L/UI:P) describes a hard-to-reach bug: adjacent network vector, high attack complexity, a present attack requirement, low privileges required, and passive user interaction - a combination that yields only a medium 5.9 score. The technical impact is inherently small: a single-element out-of-bounds read (CWE-125) yielding at most adjacent-memory information disclosure, not code execution. EPSS of 0.39% (32nd percentile) is low and aligns with the absence of a CISA KEV listing - there is no indication of active, widespread exploitation. The one elevating factor is that publicly available exploit code exists (Google issue tracker 434194797), but POC availability is a distinct signal from active exploitation and should not be conflated with it. Note a tension worth verifying: the supplied CVSS 4.0 vector rates adjacent-network delivery with user interaction (AV:A/UI:P), yet the vulnerability is in a JavaScript engine whose exploitability depends entirely on the embedding host (how untrusted script reaches the engine) - the real attack vector and privilege requirement vary by deployment and are not fixed by the vector alone. Bottom line: a real, confirmed bug with a POC, but low severity, low EPSS, and no KEV make it a patch-in-normal-cycle item rather than an emergency, unless the engine is embedded to execute untrusted script in a sensitive context. |
| Exploit ScenarioDerived | An attacker able to run crafted JavaScript inside an application that embeds the QuickJS engine calls TypedArray.prototype.indexOf() with an extremely small negative fromIndex (e.g. -1e-20); floating-point rounding makes d+len equal len, so the search begins one element past the end of the buffer. The resulting one-element out-of-bounds read can leak adjacent heap memory contents back to the attacker's script, and public exploit code demonstrating the trigger exists. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 19, 2026
Information disclosure in QuickJS occurs through a floating-point precision error in TypedArray.prototype.indexOf() when a negative fromIndex such as -1e-20 is added to the array length and rounds exactly to the length, causing a one-element out-of-bounds read. Applications embedding QuickJS and executing attacker-controlled JavaScript are affected; the supplied data does not enumerate exact version boundaries. Publicly available exploit code exists, EPSS is 0.39% (32nd percentile), and the independent assessment limits impact to low confidentiality disclosure with no integrity or availability impact.
RemediationAI
Apply a QuickJS build that contains the upstream fix; the supplied data does not give an exact fixed version, so verify the fix against the vendor changelog at https://bellard.org/quickjs/Changelog and the Google issue tracker at https://issuetracker.google.com/434194797 before deployment. If an immediate engine upgrade is not possible, reduce exposure by not executing attacker-controlled JavaScript in QuickJS; where the embedding application does not need TypedArray.prototype.indexOf(), wrap or disable that method and reject negative fromIndex values, especially tiny magnitudes whose addition to length can round to length-this can break legitimate code that relies on negative fromIndex semantics. Additionally, run the engine in a low-privilege sandboxed process and avoid exposing raw engine memory or binary outputs to untrusted callers to limit the value of a one-element out-of-bounds read; these are compensating controls, not a substitute for the engine fix.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
QuickJS is an embeddable JavaScript engine; the flaw is an out-of-bounds read (CWE-125) in the implementation of TypedArray.prototype.indexOf(). The fromIndex argument is read as a double and, when negative, used as fromIndex + length; for extremely small negative values the floating-point addition rounds to exactly length, so the computed integer start index equals length rather than length-1 or less. The search then reads one element past the valid 0..length-1 range. The supplied CVSS 4.0 vector (AV:A/AC:H/AT:P/PR:L/UI:P) is deployment-dependent, while the independent assessment uses CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N and notes that an attacker must already be able to execute JavaScript in an embedding application; impact is limited to one out-of-bounds element read and possible information disclosure, with no write or code execution. NVD's CPE is cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:*, a wildcard that does not specify affected/fixed versions; the Google issue tracker reference is labeled exploit, and the Bellard changelog is the vendor change source.
Know when Quickjs gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:L/VA:L/SC:H/SI:L/SA:L
Triggered by executing untrusted script (typically unauthenticated, remote in common embeddings, deterministic trigger so AC:L); single-element OOB read gives only C:L with no integrity or availability impact.
Primary rating from Vendor (google).
CVSS VectorVendor: google
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
A use-after-free in QuickJS's quickjs-libc standard library lets JavaScript code corrupt heap memory from inside the int
Use-after-free in QuickJS object-printing routines can corrupt memory when an attacker-influenced Array, Map, or Set is
QuickJS commit 2788d71 was discovered to contain a stack-overflow via the component js_proxy_isArray at quickjs.c. Rated
Heap out-of-bounds write in QuickJS's BigInt string parser can corrupt memory when an embedding application converts an
Integer overflow in QuickJS's libregexp bytecode accounting can become an out-of-bounds write when a crafted recursive r
Type confusion in QuickJS's handling of the string addition (+) operation allows local attackers to trigger out-of-bound
An out-of-bounds heap read in QuickJS's BigInt-to-string conversion (js_bigint_to_string1) lets script-controlled BigInt
Heap out-of-bounds write in QuickJS's bytecode deserializer (JS_ReadFunctionTag) lets a crafted serialized blob corrupt
quickjs-ng through 0.9.0 has a missing length check in JS_ReadString for a string, leading to a heap-based buffer overfl
quickjs-ng through 0.9.0 has an incorrect size calculation in JS_ReadBigInt for a BigInt, leading to a heap-based buffer
Heap-based buffer overflow in QuickJS up to version 0.11.0 within the js_typed_array_constructor function allows unauthe
A vulnerability was found in quickjs-ng QuickJS up to 0.8.0. Rated medium severity (CVSS 5.3), this vulnerability is rem
NVD
CVE.org
EPSS
GitHub PoC
Exploit-DB