Skip to main content

QuickJS CVE-2025-62494

HIGH
Incorrect Type Conversion or Cast (CWE-704)
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
    Deliver crafted JS to QuickJS runtime
  2. Delivery
    Trigger string + with malicious valueOf/toString
  3. Exploit
    Swap left operand type during callback
  4. Execution
    JS_ConcatStringInPlace misparses value
  5. Persist
    Corrupt memory out-of-bounds
  6. Impact
    Execute code in runtime context

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Correct type conversion
Exploitation Conditions

Exploitation requires the attacker to execute attacker-controlled JavaScript inside the QuickJS engine and to register a valueOf/toString callback on the right-hand operand of a string '+' operation that reassigns the left-hand operand to a non-string type (object/array) mid-evaluation - this callback manipulation IS the core precondition. Limiting factors per the vendor CVSS 4.0 vector: AC:H and AT:P indicate a specific, non-trivial condition and timing must be met; PR:L means some level of authenticated/low-privilege access to the runtime is needed; UI:P implies passive user interaction; and AV:A scopes it to adjacent reach rather than open internet. Realistic impact therefore hinges on whether the embedding product evaluates untrusted/remote JavaScript - engines that only run trusted first-party scripts are not meaningfully exposed.

Impact

This is a genuine but conditional priority, not an inflated high-CVSS artifact. The CWE-704 type confusion in QuickJS's string '+' handling is a real memory-corruption primitive (OOB access → potential arbitrary code execution) and a public exploit exists on Google's issue tracker (issuetracker.google.com/434193023), reported by Google's CVE coordination team - a credible source that raises the realism of weaponization. However, the vendor-supplied CVSS is 4.0 only (7.1) with a notably restrictive vector: AV:A (adjacent), AC:H (high complexity), AT:P (a specific attack requirement must hold), PR:L (low privileges required), and UI:P (passive user interaction). These signals collectively indicate exploitation is not trivial 'spray-and-pray' - it requires the ability to run crafted JavaScript in the QuickJS runtime and to win the type-swap timing inside the toString/valueOf callback. There is NO CISA KEV listing and NO EPSS score provided, so widespread opportunistic exploitation is NOT evidenced; the public POC indicates capability, not active in-the-wild campaigns. Note a tension to verify: the vendor marks AV:A/PR:L, whereas the vulnerability class (a JS engine processing attacker-controlled script) is commonly modeled as content-delivery rather than adjacent-network - the realistic access path depends entirely on how a given product embeds QuickJS, so defenders should confirm their exposure surface with the embedding vendor rather than relying on AV:A alone.

Exploit ScenarioDerived

An attacker supplies crafted JavaScript to an application embedding QuickJS; the script performs a string concatenation where the right-hand operand's toString/valueOf callback reassigns the left-hand operand from a string to an object or array, so JS_ConcatStringInPlace then operates on a mismatched type. This yields out-of-bounds access and memory corruption that can be groomed into arbitrary code execution within the QuickJS runtime's process context. A publicly available exploit/POC exists on Google's issue tracker, so working trigger code is accessible.

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

Type confusion in QuickJS's handling of the string addition (+) operation allows local attackers to trigger out-of-bounds memory access, potentially leading to memory corruption and arbitrary code execution. The flaw arises when a callback (e.g., toString or valueOf) invoked during conversion of the right-hand operand modifies the left-hand operand's type from string to object, after which JS_ConcatStringInPlace still treats it as a string. Publicly available exploit code exists, and our independent assessment rates the attack as local, high complexity, with no privileges or user interaction required, though the vendor's CVSS 4.0 vector indicates adjacent access and low privileges.

RemediationAI

Apply the latest QuickJS update from the official changelog (https://bellard.org/quickjs/Changelog) when a patched version is released; no exact fix version is identified in the provided data, so monitor the changelog and the issue tracker for updates. As a workaround, avoid executing untrusted JavaScript in QuickJS, or run the engine in a sandboxed process with strict memory limits and seccomp filters, noting that sandboxing may add performance overhead and complexity. Disabling user-defined toString/valueOf callbacks is not practical because it breaks JavaScript semantics. Because publicly available exploit code exists, prioritize patching any deployment that evaluates attacker-controlled JavaScript, and restrict network access to the engine where possible.

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 JavaScript engine by Fabrice Bellard, used in embedded and standalone contexts. The vulnerability is a type confusion (CWE-704: Incorrect Type Conversion or Cast) in the engine's string concatenation logic. Specifically, when evaluating a '+' operation, the engine checks that the left-hand operand is a string, then calls JS_ToPrimitiveFree on the right-hand operand. This conversion can invoke user-defined toString or valueOf callbacks. During such a callback, an attacker can reassign the left-hand operand to a non-string type (e.g., object or array). The code then calls JS_ConcatStringInPlace, which assumes the left-hand operand is still a string, leading to a type mismatch that can cause out-of-bounds memory access. The CPE cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:* indicates all versions are potentially affected. Our independent assessment (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) finds local access, high attack complexity, no privileges required, and no user interaction, with high confidentiality, integrity, and availability impact. The vendor's CVSS 4.0 vector (AV:A/AC:H/AT:P/PR:L/UI:P) differs, suggesting adjacent access, low privileges, and passive user interaction.

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 7.4 HIGH

Requires running attacker-supplied JS in the engine and winning the callback type-swap, so AV:L/AC:H; memory corruption yields full RCE within the host process, so C/I/A:H, S:U.

3.1 AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:L/AC:H/AT:N/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 type confusion vulnerability exists in the handling of the string addition (+) operation within the QuickJS engine.

  • The code first checks if the left-hand operand is a string.
  • It then attempts to convert the right-hand operand to a primitive value using JS_ToPrimitiveFree. This conversion can trigger a callback (e.g., toString or valueOf).
  • During this callback, an attacker can modify the type of the left-hand operand in memory, changing it from a string to a different type (e.g., an object or an array).
  • The code then proceeds to call JS_ConcatStringInPlace, which still treats the modified left-hand value as a string.

This mismatch between the assumed type (string) and the actual type allows an attacker to control the data structure being processed by the concatenation logic, resulting in a type confusion condition. This can lead to out-of-bounds memory access, potentially resulting in memory corruption and arbitrary code execution in the context of the QuickJS runtime.

Executive ViewAI

Why It Matters

QuickJS, a JavaScript engine commonly embedded in applications, has a high-severity memory corruption vulnerability (CVE-2025-62494) for which publicly available exploit code exists and no vendor-released patch has been identified. Leadership should care because successful exploitation could enable arbitrary code execution on systems that evaluate untrusted JavaScript, threatening application integrity and trust; priority should focus on reducing exposure while a fix is obtained.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include restricting local and adjacent access to QuickJS, running it in a low-privilege sandbox or container, avoiding execution of untrusted JavaScript, applying memory-safety hardening such as ASLR, DEP, and CFI, and monitoring for crashes or anomalous code execution.

Threat Intelligence Overview

EPSS Score
0.5%
Top 57% exploitable
Prevalence
Low
niche embeddable JS engine, limited and specialized production footprint
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
High

Priority Score

57
Low Medium High Critical
KEV: 0
EPSS: +1
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.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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-62496 HIGH POC
7.1 Oct 16

Heap out-of-bounds write in QuickJS's BigInt string parser can corrupt memory when an embedding application converts an

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-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