Skip to main content

QuickJS CVE-2025-62496

HIGH
Integer Overflow or Wraparound (CWE-190)
2025-10-16 cve-coordination@google.com
7.1
CVSS 4.0 · Vendor: google
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply malicious script to QuickJS engine
  2. Delivery
    Pass ~80M-digit string to BigInt parse
  3. Exploit
    Overflow (n_digits*27+7) past int32
  4. Execution
    Allocate undersized JSBigInt limb buffer
  5. Persist
    Write past r->tab, corrupt heap
  6. Impact
    Achieve memory corruption / potential RCE

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK

1 technique across 1 tactic: Execution

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 embedding application to pass attacker-controllable input into QuickJS BigInt string parsing (js_bigint_from_string) AND to permit an extremely large input - a decimal (radix-10) string of approximately 79,536,432 digits or more (on the order of 80 MB) needed to overflow the signed 32-bit computation (n_digits*27+7). The primary limiting factors are: (1) the application must accept/forward multi-tens-of-megabytes strings to BigInt conversion, which default input-size limits or sane application validation will prevent; (2) reliable code execution (beyond a crash) requires heap grooming, reflected in the High attack complexity; (3) the published vector further constrains exploitation to adjacent access, low privileges, and passive user interaction, implying a particular deployment rather than open remote script execution. Against an embedding that freely runs untrusted scripts with no input-size cap, the effective barrier is chiefly the massive-input requirement and exploit reliability, not authentication.

Impact

Signals are mixed and point to a moderate, non-urgent priority rather than an emergency. The input CVSS 4.0 base score is 7.1 (High) with a notably constrained vector (AV:A adjacent, AC:H, AT:P, PR:L, UI:P), meaning the provider modeled this as requiring adjacent network access, high complexity, a specific attack condition, low privileges, and passive user interaction - a demanding chain, not trivial remote exploitation. CWE-190 (integer overflow) leading to a heap out-of-bounds write is memory corruption with code-execution potential, which raises impact. Countervailing the severity: there is NO CISA KEV listing (no confirmed active exploitation) and no EPSS score was provided, so exploitation-probability cannot be quantified from the input. A public POC does exist (Google issue tracker 434193016, reported by Google's CVE coordination team), so the bug is understood and reproducible, but POC availability is distinct from in-the-wild use. A key limiting factor largely independent of the CVSS vector is the trigger condition itself: it requires parsing a BigInt from a string of roughly 79,536,432+ decimal digits (an ~80 MB input), which most applications will never accept from untrusted sources. CONFLICT TO VERIFY: a JavaScript-engine memory-corruption bug triggered purely by script execution would normally be modeled network-reachable and unauthenticated (AV:N/PR:N), yet the supplied 4.0 vector uses AV:A/PR:L/UI:P - this discrepancy suggests the published metrics reflect a specific embedding/deployment assumption rather than the generic 'engine runs untrusted script' case; verify the intended attack surface with the embedder/vendor.

Exploit ScenarioDerived

An attacker who can supply JavaScript (or a BigInt string input) to an application embedding QuickJS crafts a script that calls BigInt parsing on a decimal string of ~79.5 million or more digits, triggering the 32-bit integer overflow in js_bigint_from_string, which under-allocates the JSBigInt limb buffer and then writes past it, corrupting the heap. A public proof-of-concept exists on Google's issue tracker, so the trigger is documented and reproducible; successful weaponization to code execution would still require heap grooming, consistent with the High attack complexity in the CVSS vector.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 19, 2026

Heap out-of-bounds write in QuickJS's BigInt string parser can corrupt memory when an embedding application converts an excessively long decimal string (roughly 79,536,432 digits or more) into a BigInt. Publicly available exploit code exists, but there is no CISA KEV confirmation of active exploitation. Practical exposure is constrained because the application must accept and forward an approximately 80 MB attacker-controlled string to BigInt parsing, and reliable code execution beyond a crash requires heap grooming; default input-size limits or sane validation usually prevent the trigger.

RemediationAI

Upgrade to a QuickJS release that includes the BigInt string-parsing fix; consult the vendor changelog at https://bellard.org/quickjs/Changelog and the issue tracker at https://issuetracker.google.com/434193016, because the supplied data does not specify an exact fixed version. Until upgraded, enforce a hard maximum length on strings passed to BigInt conversion, well below the roughly 79.5 million-digit trigger, and reject oversized request bodies or parameters before parsing; the trade-off is that legitimate very large BigInt values will be rejected. Also restrict exposure of any service that evaluates untrusted JavaScript with QuickJS, cap process memory, and isolate the parser in a low-privilege worker; these measures reduce blast radius but do not correct the signed 32-bit overflow.

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 a small embeddable JavaScript engine; BigInt values are represented in a JSBigInt object with a limb array such as r->tab. In js_bigint_from_string, radix-10 parsing computes the bit estimate n_bits = (n_digits * 27 + 7) / 8 in signed 32-bit arithmetic; once n_digits reaches about 79.5 million, the multiplication overflows (CWE-190), n_bits becomes too small or negative, and n_limbs is underestimated. The subsequent allocation is undersized for the parsed value, and writing the BigInt limbs past the end of r->tab causes a heap out-of-bounds write. The CPE cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:* flags the QuickJS project broadly, but the supplied data does not enumerate exact affected or fixed releases; the independent assessment emphasizes high attack complexity and deployment-specific input-size constraints rather than an open remote-script-execution primitive.

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

Vendor (google) PRIMARY 7.1 HIGH
CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L
vuln.today AI 8.1 HIGH

A JS engine typically executes untrusted scripts (AV:N/PR:N/UI:N), but the ~80MB-string trigger plus heap grooming for reliable corruption justifies AC:H; memory corruption yields high C/I/A, scope unchanged within the process.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (google).

CVSS VectorVendor: google

Attack Vector
Adjacent
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
Low

DescriptionCVE.org

A vulnerability exists in the QuickJS engine's BigInt string parsing logic (js_bigint_from_string) when attempting to create a BigInt from a string with an excessively large number of digits.

The function calculates the necessary number of bits (n_bits) required to store the BigInt using the formula:

$$\text{n\_bits} = (\text{n\_digits} \times 27 + 7) / 8 \quad (\text{for radix 10})$$

  • For large input strings (e.g., $79,536,432$ digits or more for base 10), the intermediate calculation $(\text{n\_digits} \times 27 + 7)$ exceeds the maximum value of a standard signed 32-bit integer, resulting in an Integer Overflow.
  • The resulting n_bits value becomes unexpectedly small or even negative due to this wrap-around.
  • This flawed n_bits is then used to compute n_limbs, the number of memory "limbs" needed for the BigInt object. Since n_bits is too small, the calculated n_limbs is also significantly underestimated.
  • The function proceeds to allocate a JSBigInt object using this underestimated n_limbs.
  • When the function later attempts to write the actual BigInt data into the allocated object, the small buffer size is quickly exceeded, leading to a Heap Out-of-Bounds Write as data is written past the end of the allocated r->tab array.

Executive ViewAI

Why It Matters

QuickJS's BigInt string parser contains a heap out-of-bounds write that can crash or potentially corrupt memory in applications that convert untrusted, extremely long decimal strings into BigInt values. Exposure is limited to deployments that accept and forward roughly 80 MB attacker-controlled strings without size validation, but because publicly available exploit code exists and no vendor-released patch is identified, leadership should treat this as a manageable but urgent input-validation and availability risk.

Business Impact: Medium
Compensating Controls

Enforce input-size limits below the ~80 MB trigger threshold; reject or truncate excessively long decimal strings before BigInt conversion; avoid passing untrusted strings to QuickJS BigInt parsing; isolate or sandbox QuickJS processes; monitor for crashes and anomalous memory behavior.

Threat Intelligence Overview

EPSS Score
0.5%
Top 60% exploitable
Prevalence
Medium
popular embeddable JavaScript engine, moderate adoption in apps and embedded systems
Exploit
POC
Public exploit code exists
Data Quality
2 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Controlled
Automatable· derived
No
Human Impact
Medium

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.

Affected Products (CPE)CVE.org

cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:*
CVE-2025-62491 HIGH POC
8.8 Oct 16

A use-after-free in QuickJS's quickjs-libc standard library lets JavaScript code corrupt heap memory from inside the int

CVE-2025-62490 HIGH POC
8.8 Oct 16

Use-after-free in QuickJS object-printing routines can corrupt memory when an attacker-influenced Array, Map, or Set is

CVE-2023-31922 HIGH POC
7.5 May 12

QuickJS commit 2788d71 was discovered to contain a stack-overflow via the component js_proxy_isArray at quickjs.c. Rated

CVE-2025-62495 HIGH POC
7.1 Oct 16

Integer overflow in QuickJS's libregexp bytecode accounting can become an out-of-bounds write when a crafted recursive r

CVE-2025-62494 HIGH POC
7.1 Oct 16

Type confusion in QuickJS's handling of the string addition (+) operation allows local attackers to trigger out-of-bound

CVE-2025-62492 MEDIUM POC
5.9 Oct 16

Information disclosure in QuickJS occurs through a floating-point precision error in TypedArray.prototype.indexOf() when

CVE-2025-62493 MEDIUM POC
5.9 Oct 16

An out-of-bounds heap read in QuickJS's BigInt-to-string conversion (js_bigint_to_string1) lets script-controlled BigInt

CVE-2026-88378 CRITICAL
9.8 Sep 24

Heap out-of-bounds write in QuickJS's bytecode deserializer (JS_ReadFunctionTag) lets a crafted serialized blob corrupt

CVE-2025-46687 MEDIUM POC
5.6 Apr 27

quickjs-ng through 0.9.0 has a missing length check in JS_ReadString for a string, leading to a heap-based buffer overfl

CVE-2025-46688 MEDIUM POC
5.6 Apr 27

quickjs-ng through 0.9.0 has an incorrect size calculation in JS_ReadBigInt for a BigInt, leading to a heap-based buffer

CVE-2026-0821 MEDIUM POC
5.5 Jan 10

Heap-based buffer overflow in QuickJS up to version 0.11.0 within the js_typed_array_constructor function allows unauthe

CVE-2024-13903 MEDIUM POC
5.3 Mar 21

A vulnerability was found in quickjs-ng QuickJS up to 0.8.0. Rated medium severity (CVSS 5.3), this vulnerability is rem

References

Advisories & patches

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy