Manuscript Offprint
arXiv:2610.10844When Flaws Cascade: Understanding Vulnerabilities and Exploitation Chains in JavaScript Engines
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Yuhan Ma
Tianjin University
Tianjin, China
Qiang Hu
Tianjin University
Tianjin, China
Jiongchi Yu
Nanyang Technological University
Singapore, Singapore
Zhiyi Zhang
Qi An Xin Group Corp
Beijing, China
Xiaofei Xie
Singapore Management University
Singapore, Singapore
Junjie Wang
Tianjin University
Tianjin, China
Abstract
JavaScript engines are pivotal to modern web browsers, enabling the execution of dynamic and interactive web applications. However, their complexity and widespread adoption make them prime targets for attackers exploiting vulnerabilities. While existing research has focused on detecting vulnerabilities of JavaScript engines, a significant gap remains in systematically understanding the characteristics of these vulnerabilities, including their symptoms, root causes, and exploitability. This paper bridges this gap by presenting the first comprehensive empirical study on vulnerabilities in JavaScript engines, investigating their characteristics and potential exploitation strategies.
We construct a dataset comprising 241 vulnerabilities across four mainstream JavaScript engines from 2017 to 2024. Through in-depth analysis, we first develop taxonomies for symptoms and root causes. Building on this understanding, we investigate the exploitability of these vulnerabilities, identifying key prerequisites and extracting vulnerability trigger chains that demonstrate how logical errors propagate into memory safety violations. Additionally, we analyze the mitigation strategies to counter these exploitations. Finally, we summarize key implications for various stakeholders, including developers and researchers, offering actionable insights to improve the security and resilience of JavaScript engines.
CCS Concepts
• Software and its engineering → Software defect analysis.
1 Introduction
JavaScript (JS) is one of the most widely used programming languages, forming the backbone of interactive and dynamic web applications. According to recent statistics [54], JS is utilized on the client side by 99% of all websites. Virtually every modern web browser integrates a JS engine, such as Google's V8 in Chrome, JavaScriptCore (JSC) in Safari, SpiderMonkey (SM) in Firefox, and ChakraCore (CH) in Microsoft Edge (formerly used in Internet Explorer), underscoring its critical role in delivering rich and responsive user experiences. Beyond web browsers, JS has evolved into a versatile language, extending its applications to mobile app development and desktop applications, and its engine serves as the key component for executing code written in JS language.
Motivation. JS remains the dominant language for client-side web development. Its dynamic nature and runtime flexibility enable rich web experiences but also introduce complexity in engine implementation. Features such as dynamic typing, prototype-based inheritance, and runtime code execution (e.g., via eval) complicate the development of secure and efficient JS engines. While similar constructs exist in other languages (e.g., exec in Python), the ubiquity of JS in browsers and its exposure to untrusted input elevate the risk profile of JS engines in real-world scenarios.
Modern JS engines are complex systems that integrate multiple subsystems, including interpreters, just-in-time (JIT) compilers, and garbage collectors. Their performance-critical nature and tight coupling with web browsers make them attractive targets for attackers. Existing studies [21, 29] have highlighted the prevalence of vulnerabilities in JS engines, with many high-impact CVEs demonstrating their security relevance. Real-world incidents further underscore this concern. For instance, the 2016 NSO Group spyware attack on UAE activist Ahmed Mansoor exploited a Safari JS engine vulnerability (CVE-2016-4657 [35]) as part of a zero-click jailbreak chain [27]. While such vulnerabilities are not unique to JS engines, their position as the gateway to executing client-side logic on the web amplifies their impact.
Despite increasing research on fuzzing and testing techniques for JS engines [17, 23, 55, 57], and some efforts to examine specific classes of vulnerabilities (e.g., JIT bugs [16, 28]), the landscape remains fragmented. Prior work often focuses on isolated cases or lacks a systematic, security-centered taxonomy. Moreover, publicly available vulnerability databases [19, 26] provide limited insights into exploitability or root causes. This gap motivates our effort to empirically study JS engine vulnerabilities through the lens of both security impact and root cause taxonomy.
To address this gap, we conduct the first empirical study aimed at understanding vulnerabilities in JS engines. This study seeks to answer three key research questions: RQ1: What are the symptoms of vulnerabilities in JS engines? RQ2: What are the prevalent root causes and distribution characteristics of these vulnerabilities? RQ3: How can these vulnerabilities be used for exploitation?
Contributions. To address these research questions, we first build a comprehensive dataset of JS engine vulnerabilities collected
Yuhan Ma, Jiongchi Yu, Xiaofei Xie, Qiang Hu, Zhiyi Zhang, and Junjie Wang
from multiple sources, focusing on the four major engines: V8, JSC, SM, and CH. After filtering, 241 vulnerabilities are retained for analyzing their characteristics, and 22 representative trigger chains are manually constructed and analyzed. Regarding vulnerability characteristics, our study mainly examines the symptoms and their root causes. Identifying symptoms helps understand their impact and facilitates the design of targeted detection strategies tailored to specific manifestations. Investigating root causes provides valuable insights into the underlying issues, enabling the development of robust preventative measures to enhance the overall security of JS engines. For exploits, we analyze these vulnerabilities from both attack and defense perspectives, aiming to understand how they are leveraged in attacks and how they can be mitigated. Specifically, we identify vulnerability trigger chains that trace the flow from root causes to memory corruption. Analyzing these chains reveals the impact of vulnerabilities and informs effective mitigation strategies.
In summary, we identify 6 types of symptoms and 15 types of root causes. Among the symptoms, the majority fall into two main categories: crash (70.54%) and erroneous functionality (27.39%). For root causes, most vulnerabilities originate from incorrect type handling (31.54%) and incorrect data structure handling (29.46%), both of which are closely tied to the dynamic and weakly typed nature of JS. Furthermore, issues related to engine optimization algorithms contribute significantly, representing 18.67% of the root causes. Moreover, we summarize various vulnerability trigger chains to illustrate how logical errors in the engine propagate across multiple stages, ultimately leading to memory safety violations. This analysis provides insights into exploitation and identifies critical points for effective mitigation. Based on our findings, we further offer key implications through in-depth discussions for various stakeholders.
In summary, this paper makes the following contributions:
• We construct a comprehensive dataset containing 241 vulnerabilities across four mainstream JS engines, covering a seven-year timespan since Jan 1st, 2017.
• We conduct the first empirical study of JS engine vulnerabilities, providing statistics on their distribution and taxonomies of symptoms and root causes.
• We analyze JS engine vulnerability exploitability, construct trigger chains to understand risks, and mitigation strategies.
• We provide key implications for various stakeholders, offering actionable insights to enhance the security of JS engines.
2 Background
The primary role of a JS engine is to transform JS source code into executable code and run it efficiently at runtime. Unlike traditional compilers, which compile static languages (e.g., C/C++ or Java) into machine code in a single pass, JS engines must dynamically handle JS's flexible and interpreted nature. Instead of precompiling the entire program, they process plain-text JS at runtime, translating it into bytecode, which is then executed either by an interpreter or a JIT compiler. To balance fast startup and runtime performance, JS engines use a hybrid execution model, interpreting code for immediate execution and progressively compiling frequently executed portions into optimized machine code through JIT compilation.

Figure 1: The architecture of the JS engine.
Figure 1 shows the general architecture of JS engines, which consists of six main components: Parser, Bytecode Generator, Interpreter, Runtime, Garbage Collector, and JIT Compiler. These components work together to support the JS execution process, which is structured into multiple phases, each handling specific tasks. For example:
• Parsing & Bytecode Generation: The engine constructs the AST and converts it into bytecode to support JS execution.
• Runtime Execution: Code execution begins with interpretation, allowing immediate execution, while frequently used code is progressively optimized through JIT compilation.
• JIT Optimization: The JIT compiler improves execution by speculatively making assumptions about runtime behavior and applying optimizations. Common speculation techniques include Type Speculation phase and Range Speculation phase. Common optimizations include phases such as Constant Folding (CF), Common Subexpression Elimination (CSE), Reduction, Escape Analysis, Lowering, Dead Code Elimination (DCE), Bounds Check Elimination (BCE), Instruction Scheduling, Type Check Elimination (TCE), and Write Barrier Elision (WBE).
• Garbage Collection: The Garbage Collector periodically reclaims memory via marking and sweeping.
3 Methodology
Figure 2 outlines the workflow of our study. We collect all publicly reported vulnerabilities from the four major JS engines, filter for high-impact, well-documented cases, and build a dual taxonomy of symptoms and root causes. We then trace each vulnerability across engine phases to reconstruct its exploitation chain and assess the mitigations that disrupt it.
3.1 Data Preparation
We focus on the four most widely deployed JS engines: V8, JSC, SM, and CH, which underpin major browsers and runtimes. To build a comprehensive dataset, we aggregate all publicly reported engine vulnerabilities from diverse sources, including CVE databases, official security advisories, bug-tracking systems, research blogs, and conference disclosures. In total, we identify 1,215 candidate entries before screening.
We then filter out outdated or insufficiently documented records, retaining only well-analyzed vulnerabilities published since 2017. To ensure analytical depth, we prioritize high-severity cases (CVSS > 7.0) or those with bounty recognition, yielding 241 high-impact vulnerabilities. For each case, we collect patch and discussion data from the corresponding bug trackers to reconstruct resolution context and technical reasoning. Among these, 75 vulnerabilities include

Figure 2: The overview of our study.
exploitable proofs of concept (PoCs), which we further analyze to trace exploitation trigger chains. Detailed data collection and triage procedures, including keyword selection and supplementary mining from restricted trackers, are provided in Appendix A.1.
3.2 Manual Analysis
To systematically understand JS engine vulnerabilities, we manually analyze the 241 filtered samples across two dimensions: (1) their surface-level symptoms and root causes, and (2) their exploitability and propagation behavior.
Vulnerability Characteristics. We adopt open coding [47, 49] to extract taxonomies for symptoms and root causes. The dataset is split into two halves and annotated in two phases. Three security researchers independently annotate the first half. Each has 3–5 years of experience in software security, with prior work involving vulnerability analysis and fuzzing for JS engines. After the initial annotation, the three analysts reconciled their labels. Unresolved cases were adjudicated by a senior team member with over 10 years of vulnerability research experience and multiple top-tier publications, who served as the final arbiter when consensus could not be reached. The analysis proceeds similarly with the second half of the data. Following discussions on the preliminary taxonomy, the three experts reassess and label the remaining half of the vulnerabilities. To evaluate the consistency of the categorizations made, we employ Cohen's Kappa (k) coefficient [24] to measure inter-rater reliability, where higher values indicate greater agreement. After completing the annotation of the entire dataset, we observed that in the first round of analysis, the inter-rater reliability (k) reaches 0.51, indicating moderate agreement. After the discussion and the second labeling phase, the k value rose to 0.85, demonstrating almost perfect agreement.
Vulnerability Exploitation. We concentrate on the 75 vulnerabilities that ship with a reproducible PoC or a publicly documented exploit chain. This subset offers the concrete runtime evidence needed to follow a bug's propagation across engine phases. Four members of our team replayed each PoC, tracing the call stack from the root cause through every execution phase to the final symptom. The process revealed 22 distinct trigger-chain patterns, which we detail in section 6.
Table 1: Distribution of Symptoms
| Symptom | V8 | JSC | SM | CH | Total | ||
|---|---|---|---|---|---|---|---|
| Crash | MSV | OOB | 25 | 16 | 2 | 6 | 49 |
| TC | 15 | 7 | 4 | 41 | 67 | ||
| UAF | 4 | 5 | 11 | 5 | 25 | ||
| VF | 19 | 2 | 7 | 1 | 29 | ||
| EF | 30 | 15 | 5 | 16 | 66 | ||
| Others | 0 | 1 | 0 | 4 | 5 | ||
| Total | 93 | 46 | 29 | 73 | 241 | ||
4 Symptom Taxonomy
Through manual analysis, we have identified two main categories of vulnerability symptoms in JS engines. We observe that these symptoms bear similarities to those discussed in traditional software bug studies [47, 49]. Therefore, here we focus primarily on those symptoms specific to JS engines, as detailed in the symptom distribution shown in Table 1, and we classify five vulnerabilities as Others due to ambiguous symptom information that could not be clearly categorized.
Crash occurs when a JS engine terminates unexpectedly, accounting for most of the vulnerabilities (70.54%) we studied. These can be further categorized into Memory Safety Violation (MSV) and Validation Failure (VF). MSV occurs when the engine improperly accesses memory (e.g., writes beyond allocated bounds), causing unexpected termination. These violations include Out-of-Bounds (OOB) access, Type Confusion (TC), and Use-After-Free (UAF), each posing serious security risks. VF occurs when the program's state diverges from predefined assertions and debugging utilities, which are employed to identify breaches of expected invariants or assumptions in the code.
Among these crashes, MSVs account for the majority (82.94%) across all four JS engines. Different engines show distinct vulnerability tendencies: V8 primarily exhibits OOB (56.82%) and TC (34.09%) symptoms, while JSC displays similar distributions (57.14% and 25.00%). SM shows fewer crashes overall but has the highest UAF rate (64.71%), likely due to its complex GC subsystem. In contrast,
Yuhan Ma, Jiongchi Yu, Xiaofei Xie, Qiang Hu, Zhiyi Zhang, and Junjie Wang
CH has a dominant TC symptom rate of 78.85%, reflecting weaknesses in its type management. VF is more prevalent in V8 and SM, accounting for 20.43% and 24.14% of their vulnerabilities, respectively. This prevalence is mainly because V8 and SM implement stricter assertion checks in debug mode to detect logical inconsistencies early on. Notably, 65.5% of VF can escalate into MSVs in release versions, emphasizing the importance of secured validation, especially for memory-related code.
Finding 1: Crashes are the most common symptom (70.54%), predominantly manifested as MSVs (82.94%) across all studied JS engine vulnerabilities. The high prevalence of VF in V8 and SM indicates their stricter assertion checks, which serve as early indicators of potential security issues.
Erroneous Functionality (EF) appears when a JS engine behaves unexpectedly without crashing. For example, aggressive optimization techniques may introduce errors by making invalid assumptions about variable types, which leads to inaccurate results, like CVE-2018-0777 [38]. We observe that EF is a relatively common symptom, accounting for 27.39% of the studied vulnerabilities. Unlike crashes, EF vulnerabilities are more subtle, often appearing as incorrect computations or optimization errors. They are harder to detect since they rarely trigger runtime errors, remaining latent during execution and surfacing only under specific inputs or paths.
Finding 2: EF vulnerabilities are more difficult to observe compared to crashes, yet they account for an average of 27.39% vulnerabilities.
5 Root Cause Analysis
5.1 Root Cause Taxonomy
We further analyze the root causes of vulnerabilities in JS engines, as illustrated in Figure 3. We identify 6 main categories and divide them into 15 leaf categories based on their execution mechanisms: Incorrect Control Flow Handling (A). These vulnerabilities are primarily caused by the mismanagement of execution flow within JS engines, which includes incorrect code log branching or jumping and inconsistencies between the execution flow logic of two compilations, taking up 3.32% of the studied vulnerabilities.
Incorrect Type Handling (B). Incorrect Type Handling is the most prevalent root cause (31.54%) among all the vulnerabilities. Given the dynamic type nature of JS, effectively managing variables of different types is crucial. A detailed example is provided in subsection A.2, which demonstrates how improper assumptions in V8's handling of RegExp objects can lead to OOB. We further subdivide these vulnerabilities into three subcategories based on the various scenarios in which JS engines process types: ① Type Conversion Error (B.1) refers to the problems in converting between different internal representations. ② Type Inference Error (B.2) involves inaccuracies in deducing the types of variables or objects, which includes two subtypes: Incorrect Type Consistency Assumption (B.2.1) vulnerabilities erroneously assumes that a variable's type remains consistent throughout execution, and Incorrect Type Speculation (B.2.2) vulnerabilities incorrectly speculates the type of variables during the optimization phase. ③ Type Misuse (B.3) arises when a type is incorrectly assigned to objects in a manner inconsistent with their intended usage.
Incorrect Data Structure Handling (C). Incorrect Data Structure Handling accounts for 29.46% of the studied vulnerabilities. These issues typically stem from improper management or misinterpretation of the JS engine's internal data structures. We have divided these vulnerabilities into five subcategories: ① Missing Boundary/Accessibility Check (C.1) refers to the missing of necessary checks on the boundaries or accessibility of data structures in JS engines. ② Incorrect Range Speculation (C.2) involves errors in predicting or speculating the range of valid variables during JS engine optimization. ③ Incorrect Boundary Calculation (C.3) refers to errors where boundary checks exist but are improperly calculated for the specific context. ④ Incorrect Structure Tracking (C.4) covers vulnerabilities caused by failures in maintaining accurate internal metadata or object layouts. ⑤ Improper Synchronization of Shared Data (C.5) represent the concurrency issues where shared data structures in JS engines are accessed by multiple threads without adequate synchronization, leading to race conditions or data corruption.
Incorrect Optimization Algorithm (D). Optimization is a crucial phase in JS engines as it impacts the entire execution process, and associated vulnerabilities can have significant effects.
We find these vulnerabilities often arise from logical errors in the implementation of optimization algorithms within JS engines, which takes up 18.67% of the vulnerabilities. A detailed example is provided in subsection A.3, which illustrates CVE-2017-0234 [36], an optimization-related vulnerability in CH.
Incorrect Resource Management (E). These vulnerabilities, accounting for 11.62% of the total, result from the mismanagement of various resources within the JS engine, which includes three subcategories: ① Improper Allocation (E.1) involves errors in allocating or initializing resources such as memory and objects, including incorrect allocation, improper initialization, and deallocation failures. ② Incorrect Garbage Collection (GC) (E.2) involves errors in the mechanisms responsible for reclaiming unused resources. These vulnerabilities can be divided into Incorrect Reference Tracking (E.2.1), which pertains to errors in maintaining correct reference counts or relationships between resources and Incorrect Mark-and-Sweep (E.2.2), which refers to flaws in the process of marking active resources and subsequently sweeping unreferenced ones. Others (F). For vulnerabilities that fail to fit into our established categories, we assemble them in the category titled Others, such as vulnerabilities caused by incorrect handling of register and wrong resolution for the engine parameter scope [37].
Finding 3: Incorrect Type Handling (B) and Incorrect Data Structure Handling (C) account for a majority of studied vulnerabilities, reflecting the challenges posed by JS's dynamic type system and flexible object structures.
5.2 Root Cause Distribution Analysis
Figure 4 illustrates the distribution of vulnerabilities in four JS engines, categorized by their root causes. We observe that vulnerabilities related to JS property management (including Incorrect Type Handling (B) and Incorrect Data Structure Handling (C)) constitute the majority in all engines.

Figure 3: Root causes of vulnerabilities in JS engine.

Figure 4: Vulnerability distribution in each JS engine by Root Causes
Notably, CH exhibits a significantly higher proportion of Incorrect Type Handling (B) vulnerabilities (52.05%) compared to the other engines. This discrepancy stems from CH's design, which is less sensitive to dynamic type conversions and structural changes. Such insensitivity often leads to inconsistencies, compounded by overly aggressive speculative optimizations that lack adequate fallback mechanisms. In contrast, V8 and JSC show considerably higher proportions of Incorrect Data Structure Handling (C) vulnerabilities (38.71% and 41.30%, respectively). In JSC, these issues mainly stem from failures to maintain structural integrity during dynamic property updates, prototype transitions, and array operations. In V8, the issue arises from the complexity of its inline caching and hidden class system, which is designed to enhance execution speed [52] but also introduces risks of type instability and structural inconsistencies. Moreover, V8's Typer phase demonstrates challenges with speculative optimization and integer conversion in edge cases.
We also observe that SM exhibits a lower proportion of Incorrect Optimization Algorithm (D) vulnerabilities (10.34%) compared to other engines. Our analysis indicates that vulnerabilities in SM primarily stem from instruction reordering and function inlining rather than aggressive speculative optimizations like TCE or DCE, which are more prevalent in V8. This may be attributed to SM's more conservative optimization strategy, which emphasizes correctness over speculative performance gains. Furthermore, SM exhibits the highest proportion of Incorrect GC (E.2) vulnerabilities (24.14%), far exceeding other JS engines. This suggests that its GC design faces challenges in reference tracking and object lifetime management, leading to frequent UAF issues.
Finding 4: Different JS engines exhibit predominant vulnerability types driven by their design mechanisms. CH is more prone to type handling errors, while V8 and JSC frequently have vulnerabilities when handling data structures. SM primarily exhibits a higher rate of GC-related issues.
6 Vulnerability Exploitation
The severity of vulnerabilities largely stems from their exploitability by attackers, which can lead to significant security risks. After understanding the symptoms and root causes of JS vulnerabilities, we delve into how these vulnerabilities can be exploited, offering insights into their exploitability and security implications.
Among various exploitation strategies, MSVs play a particularly critical role, as they often serve as the foundation for severe attacks such as arbitrary code execution and sandbox escapes. Although not every vulnerability immediately produces an MSV, many logical flaws propagate through multiple JS-engine phases and eventually culminate in exploitable MSVs. To study this escalation, we perform an exploratory analysis of vulnerability trigger chains that trace how initial logical errors traverse engine phases and evolve into MSVs, yielding insights for detection and mitigation.
6.1 Vulnerability Trigger Chain Construction
Given a vulnerability, our goal is to identify its trigger chain that can ultimately lead to MSVs. It is important to note that the vulnerability may not directly cause such violations but can affect subsequent JIT optimization or execution phases, leading to a cascade of errors that eventually result in MSVs, as detailed in JS engine phases in section 2. Formally, we define the vulnerability trigger chain as:
Definition 6.1 (Vulnerability Trigger Chain). The trigger chain of a vulnerability V, which originates in phase with root cause R, is defined as a sequence , where:
– R represents the root cause of the vulnerability.
– denotes the initial execution phase within the JS engine where the vulnerability first manifests.
– represents the phase affected by the preceding symptom .
– is the symptom observed after the execution of the current phase .
– The final node, , is a MSV, where the chain culminates.
Intuitively, a vulnerability trigger chain represents the propagation of errors across different phases (introduced in section 2) of a JS engine (from to ). Each symptom (summarized in
Yuhan Ma, Jiongchi Yu, Xiaofei Xie, Qiang Hu, Zhiyi Zhang, and Junjie Wang
section 4) is a consequence of the error propagation within a specific phase . Additionally, the root cause (defined in section 5) of the vulnerability is included at the beginning of the chain, preceding the first phase where the vulnerability manifests.
To build and verify comprehensive vulnerability trigger chains that cover as many collected vulnerabilities as possible, we design a chain construction paradigm as follows:
-
To systematically analyze vulnerability trigger chains, we select vulnerabilities with known exploit scripts, as they offer concrete runtime data that helps us model the underlying trigger chains accurately. Since not all MSVs are directly exploitable, we focus on vulnerabilities that have been successfully exploited in real-world attacks. Selecting exploitable vulnerabilities ensures that our study focuses on security issues that pose actual threats, rather than those that merely cause program crashes without affecting control flow. Moreover, known exploits often come with detailed reports or PoCs that illustrate error propagation, enabling accurate construction and validation of trigger chains. Our study identifies 75 out of 241 vulnerabilities with such exploit data, enabling credible and detailed chain analysis.
-
For each identified vulnerability, we manually construct its trigger chain by analyzing how it propagates across JS engine phases before resulting in MSVs. Starting from the PoC, we execute the exploit to observe its runtime behavior and confirm the initial error manifestation. We then trace how the error propagates through subsequent engine phases, documenting the specific symptoms at each stage. Our analysis shows that 43 of 75 vulnerabilities involve multi-step propagation, while the remaining 32 directly lead to MSVs without intermediate stages.
-
Finally, we organize the extracted information into complete vulnerability trigger chains (Theorem 6.1) by structuring the root cause, affected phases, and corresponding symptoms into coherent sequences. These chains capture how vulnerabilities propagate through the JS engine, enabling analysis of common escalation patterns across different cases.
In total, we identified 75 vulnerability trigger chains, including 32 single-phase cases that directly lead to memory violations, which have been covered in section 5. Our analysis here focuses on the remaining complex 43 multi-phase chains, which exhibit 22 distinct propagation patterns. To facilitate understanding, we group these multi-phase chains into three graph structures according to their final MSV types, including OOB, TC, and UAF, as shown in Figure 5. Each graph visualizes unique propagation patterns converging on the same MSV type. A directed path denotes one such pattern, tracing the flow from the root cause to the resulting MSV, while numeric labels on phase nodes indicate the number of vulnerabilities (out of 43) that originate from or traverse that phase.
6.2 Exploitation Analysis
Figure 5a illustrates how vulnerabilities initially manifesting as EF vulnerabilities can escalate into OOB. Although 86.96% of OOB vulnerabilities in Figure 5a involve incorrect bounds check removal, they often originate in earlier phases, with errors propagating and ultimately causing BCE-related issues. For instance, incorrect numerical computations during CF or Escape Analysis, as well as missing boundary or accessibility checks at runtime, can introduce Range Speculation errors. Such errors may prompt elimination of necessary bounds checks and ultimately lead to OOB.
For example, CVE-2020-9802 [43] originates from an incorrect optimization algorithm during the CSE phase. Through the attacker's careful crafting, the incorrect CSE implementation triggers a cascade of optimization errors, starting with incorrect numeric results. Since range speculation determines the potential value ranges of variables based on accurate expression values, the erroneous CSE outputs lead to range speculation being based on incorrect information. As a result, the BCE phase wrongly eliminates necessary bounds checks, ultimately causing OOB access at runtime.
Figure 5b shows how EF propagates across phases to cause TC. Errors in Runtime Execution propagate to Type Speculation, leading to incorrect inferences that cause the erroneous removal of type checks in the TCE phase. This weakens type safety, allowing unintended type assumptions to persist into Runtime Execution. Separately, DCE may remove essential operations, disrupting Instruction Scheduling and impacting Runtime Execution.
Figure 5c illustrates how incorrect optimization algorithms in the Lowering, GC Modeling, and WBE phases can lead to UAF. Errors propagate into WBE, causing the engine to skip write barriers. This leads to premature object reclamation during Runtime Execution, resulting in UAF when the engine attempts to access a freed object.
Among these chains, 90.70% of vulnerabilities are linked to the JIT compiler, mainly due to faulty optimizations or speculation, while the remaining 9.30% stem from runtime or interpreter issues exploitable through JIT interactions. This underscores JIT compilation as a major attack surface, where speculative execution and aggressive optimizations can introduce security flaws. Because each JIT phase depends on prior analyses, early misjudgments, such as incorrect type or control flow assumptions, can cascade into exploitable conditions.
Finding 5: JIT compilation plays a key role in vulnerability propagation, as most exploits leverage its optimizations. Speculative assumptions in JIT phases can amplify minor logic flaws into exploitable vulnerabilities, making JIT a critical attack surface.
From the constructed vulnerability trigger chains, we also find that key optimization phases (e.g., BCE, TCE, WBE) substantially amplify exploitability by transforming minor logic flaws into severe security violations. The dominant pattern, observed in 69.77% of the 43 analyzed cases shown in Figure 5, is speculative safety mechanism removal, where incorrect assumptions about program state lead to the premature elimination of essential checks. Specifically, 37.21% of cases arise from range speculation errors causing BCE to remove memory-safety checks (triggering OOB issues), 27.91% stem from type speculation errors that prompt TCE to skip type verification (leading to type confusion), and 4.65% result from GC modeling errors causing WBE to omit memory protection (resulting in UAF). These optimization phases thus serve as critical escalation points in the exploitation chain.
Finding 6: Speculative safety mechanism removal serves as a key mechanism for transforming minor logical errors into exploitable MSVs, particularly in BCE, TCE, and WBE.

(a) Vulnerability trigger chains leading to OOB

(b) Vulnerability trigger chains leading to TC

(c) Vulnerability trigger chains leading to UAF
Figure 5: Vulnerability trigger chains in JS engines.

Figure 6: Examples of exploitation and mitigation evolution
6.3 Mitigation Analysis
To defend against potential attacks, it is crucial to disrupt the vulnerability trigger chain. A direct approach is to patch vulnerabilities at their root causes, and our analysis shows that all 43 cases in Figure 5 were fixed in this way. However, although such fixes address specific issues, the trigger chains often persist, allowing similar vulnerabilities to reappear through the same exploitation techniques.
Figure 6 illustrates the evolution of Range Speculation-based exploits in V8 and the corresponding mitigation strategies. The earliest vulnerability, CVE-2019-5782 [42], exploited Range Speculation to mislead BCE, ultimately leading to OOB access during runtime execution. This vulnerability was initially mitigated through a patch (Nov 30, 2018) that strengthened Range Speculation handling. However, while that CVE was fixed, similar vulnerabilities (e.g., CVE-2019-5755 [41]) continued to emerge, leveraging the same attack trigger chain. Recognizing that individual patches were insufficient to fully prevent such exploits, developers introduced a broader security mechanism, BCE Hardening [5] (Feb 7, 2019), to structurally mitigate vulnerabilities that can affect BCE. This enhancement can block the previous vulnerability trigger chain, which significantly reduces the feasibility of BCE-based exploitation. However, other speculative optimizations may still be exploitable. For example, attackers adapted their strategies, shifting from BCE manipulation to exploiting Range Speculation in conjunction with Array Length Computation, as demonstrated in CVE-2019-13764 [40] (Nov 27, 2019). This bypass technique allowed them to regain OOB access through another trigger chain.
These progression of these exploits show that while targeted patches address individual issues, hardening critical phases (e.g., BCE) and identifying diverse trigger chains are key to disrupting exploitation paths and reducing attack surfaces.
Finding 7: Fixing individual vulnerabilities is insufficient to prevent attacks, whereas blocking the trigger chain by hardening critical phases can effectively mitigate similar exploits. However, attackers may adapt by identifying alternative chains to bypass defenses and launch attacks.
Yuhan Ma, Jiongchi Yu, Xiaofei Xie, Qiang Hu, Zhiyi Zhang, and Junjie Wang
7 Discussion
Through our in-depth analysis of vulnerability characteristics and their exploitation in JS engines, we summarize key implications based on our analysis, particularly for developers and researchers.
7.1 For Developers
① Be Careful in Handling Types and Data Structures. As highlighted in Finding 3, a large proportion of JS engine vulnerabilities arise from improper handling of dynamic types and internal structures. Developers should therefore enforce strict safeguards—such as validating type conversions and property updates (e.g., array length or object layout changes) to prevent unintended memory layout shifts, and periodically verifying speculative optimizations to ensure consistency between assumed and actual runtime types. Moreover, as noted in Finding 4, security measures should be tailored to engine-specific weaknesses: ChakraCore is more prone to type conversion errors, while V8 and JSC frequently exhibit data-structure inconsistencies. Applying these checks during property addition, array expansion, and prototype modification can substantially reduce data handling vulnerabilities.
② Balance JS Engine Efficiency and Security during Optimization. As highlighted in Finding 5, the optimization pipeline substantially broadens the attack surface, making security a first-class concern. Finding 6 further shows that speculative safety mechanism removal (e.g., BCE, TCE, and WBE) can escalate minor logic errors into severe memory-safety violations, while Finding 4 indicates that conservative optimization strategies may mitigate such risks. Yet, these aggressive optimizations remain indispensable for performance. To reconcile efficiency and security, developers should integrate security-aware mechanisms into the optimization pipeline.
③ Fix Vulnerabilities by Considering the Entire Exploit Chain. As highlighted in Finding 7, the recurring cycle of exploit and mitigation suggests that fixing individual vulnerabilities in isolation may be insufficient against evolving attack strategies. We recommend that mitigation efforts take a holistic view of the exploit chain and consider how errors in earlier phases propagate into security-critical failures. For instance, OOB vulnerabilities often stem from issues in BCE or incorrect array length speculation. Therefore, in addition to patching, developers may consider reinforcing critical optimization phases (e.g., via hardening [5]) and enriching regression test coverage to better detect such propagation patterns [6, 7].
7.2 For Researchers
① Detect Vulnerability Trigger Chains. As highlighted in Finding 6, analyzing vulnerability trigger chains is crucial for uncovering exposed attack surfaces and identifying potential patch bypass paths, particularly in memory-safety violations. Such analysis enables more targeted testing and mitigation strategies. However, efficiently discovering new trigger chains remains challenging due to the high cost of manual analysis. Recent advances in LLMs and agentic AI offer a promising alternative: LLM-based agents can systematically explore vulnerability trigger chains and detect latent weak points [18, 59], functioning as automated, continuous security auditors that strengthen JS engine resilience against exploitation.
② Design Bug-Specific Testing Methods. Our study reveals numerous JS-specific vulnerabilities, underscoring the need for tailored testing strategies beyond general-purpose fuzzing. As highlighted in Finding 3, many vulnerabilities originate from Incorrect Type Handling and Incorrect Data Structure Handling. Fuzzing effectiveness can be improved by focusing on JS engines' speculation and optimization mechanisms, which are frequent sources of vulnerabilities. Fragile features like implicit type conversions, speculative type inference, and dynamic structure transitions offer concrete directions for designing targeted inputs and feedback strategies.
③ Enhance JS Engine Testing with Advanced Oracles. Although prior research has proposed various testing approaches for JS engines, our findings indicate that certain vulnerabilities—such as EF errors, which remain difficult to detect due to the absence of crashes or other observable abnormal behaviors. Moreover, as illustrated in Figure 5, some logical bugs do not manifest as memory violations yet still introduce security risks. A promising direction is to develop advanced testing oracles guided by our vulnerability trigger chains, enabling earlier detection of logical flaws before they escalate into exploitable states. Such oracles could also contribute to vulnerability coverage and effectiveness of JS engine testing.
8 Related Works
Empirical Study for Compiler Bugs. Existing empirical studies on compiler bugs have provided insights into the common faults and their characteristics in various compilers, they often focus on general-purpose compilers like GCC and LLVM. Specifically, Sun et al. [51] conducted the empirical study on bug features in two mainstream compilers, and Zhou et al [62] deepened the study, aiming to understand the optimization bugs within the same domain.
For prior studies on JavaScript engines, Wang et al. [58] examined bugs in three major engines (V8, SM, and CH) but focused on general defect characteristics rather than security vulnerabilities or exploit behavior. The js-vuln-db project [19] collected 178 JS engine CVEs with proofs of concept, yet its coverage is outdated and limited, primarily encompassing pre-2020 data. Kang [26] provided a review of JS engine vulnerability research, emphasizing memory-related flaws and testing methodologies. In contrast, our work offers the largest and most up-to-date dataset to date with comprehensive examination of exploitation chains and mitigation strategies.
Automated Testing for JS Engines. Previous research has focused on the automated testing of JS engines, primarily employing fuzz testing methodologies. Specifically, Jsfunfuzz [48] generates test cases based on predefined grammar rules, and Domato [9] leverages context-free grammar for testing. LangFuzz [23] generates JS test cases by replacing code fragments of PoCs of historical JS engine vulnerabilities. Superion [55] extends AFL [60] to perform grammar-aware trimming and tree-based mutations on the ASTs. SoFi [22] introduces fine-grained analysis and reflection-based augmentation for mutation for more valid and diverse test samples. JIT-picking [4] and FuzzJIT [57] are designed specifically to detect JIT compiler bugs by comparing the differences in the outcomes of JS functions before and after JIT compilation. OptFuzz [56] proposed an optimization-path-guided fuzzing framework designed for JS JIT compilers.
9 Conclusion
In this paper, we present a new dataset containing 241 CVEs related to JS engines across four major engines, along with a systematic analysis of these vulnerabilities. Our analysis provides a robust taxonomy of the symptoms and root causes of the collected vulnerabilities. Furthermore, to enhance the understanding of security risks in JS engines, we explore the exploitation potential of these vulnerabilities by reconstructing vulnerability trigger chains and discussing mitigation approaches. We further analyze the identified root causes, symptoms, and vulnerability trigger chains, leading to six key findings. Based on these findings, we summarize several critical implications for various stakeholders, including developers and researchers. We believe these insights serve as a clear guide for future research and development efforts toward enhancing the security and reliability of JS engines.
References
[1] Apple. 2024. JavaScriptCore GitHub repository. https://github.com/WebKit/WebKit/tree/main/Source/JavaScriptCore.
[2] Apple. 2024. WebKit Bugzilla. https://bugs.webkit.org/.
[3] Apple. 2024. WebKit Security. https://webkit.org/security/.
[4] Lukas Bernhard, Tobias Scharnowski, Moritz Schloegel, Tim Blazytko, and Thorsten Holz. 2022. JIT-picking: Differential fuzzing of JavaScript engines. In CCS. 351–364.
[5] Chromium V8 Team. 2019. Harden turbofan's bounds check against typer bugs. https://issues.chromium.org/issues/42211993
[6] Chromium V8 Team. 2019. V8 Regression Test for CVE-2019-5755. https://chromium.googlesource.com/v8/v8.git/+413c2e787197063abd8435d9692355eb8693ad39/test/mjsunit/regress/regress-crbug-913296.js
[7] Chromium V8 Team. 2019. V8 Regression Test for CVE-2019-5782. https://chromium.googlesource.com/v8/v8.git/+8e4588915ba7a9d9d744075781cea114d49f0c7b/test/mjsunit/regress/regress-crbug-906043.js
[8] MITRE Corporation. 2024. Common Vulnerabilities and Exposures (CVE). https://cve.mitre.org/.
[9] Ivan Fratric. 2017. Domato. https://github.com/googleprojectzero/domato.
[10] Google. 2024. Chrome Security. https://chromereleases.googleblog.com/.
[11] Google. 2024. Chromium Bug Tracker. https://bugs.chromium.org/p/chromium/issues/list.
[12] Google. 2024. Google Project Zero Blog. https://googleprojectzero.blogspot.com/.
[13] Google. 2024. V8 Blog. https://v8.dev/blog.
[14] Google. 2024. V8 GitHub repository. https://github.com/v8/v8.
[15] Google Project Zero. [n.d.]. Project Zero Issue Tracker. https://project-zero ISSUES.chromium.org/issues. Accessed: 30 May 2025.
[16] Samuel Groß. 2018. Attacking Client-Side JIT Compilers. https://i.blackhat.com/us-18/Wed-August-8/us-18-Gross-New-Trends-In-Browser-Exploitation-Attacking-Client-Side-JIT-Compilers.pdf
[17] Samuel Groß. 2018. Fuzzil: Coverage guided fuzzing for javascript engines. Department of Informatics, Karlsruhe Institute of Technology (2018).
[18] Jinyao Guo, Chengpeng Wang, Xiangzhe Xu, Zian Su, and Xiangyu Zhang. 2025. RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing. arXiv preprint arXiv:2501.18160 (2025).
[19] Choongwoo Han. [n.d.]. Case Study of JavaScript Engine Vulnerabilities. https://github.com/tunz/js-vuln-db.
[20] Black Hat. 2024. Black Hat Conference. https://www.blackhat.com/.
[21] Ben Hawkes. 2019. 0day "In the Wild". https://googleprojectzero.blogspot.com/p/0day.html
[22] Xiaoyu He, Xiaofei Xie, Yuekang Li, Jianwen Sun, Feng Li, Wei Zou, Yang Liu, Lei Yu, Jianhua Zhou, Wenchang Shi, et al. 2021. SoFi: Reflection-augmented fuzzing for JavaScript engines. In CCS. 2229–2242.
[23] Christian Holler, Kim Herzig, and Andreas Zeller. 2012. Fuzzing with Code Fragments. In USENIX Security. 445–458.
[24] Louis M Hsu and Ronald Field. 2003. Interrater agreement measures: Comments on Kappan, Cohen's Kappa, Scott's , and Aickin's . Understanding Statistics 2, 3 (2003), 205–219.
[25] Zero Day Initiative. 2024. Pwn2Own Competition. https://www.zerodayinitiative.com/pwn2own/.
[26] Zeyan Kang. 2021. A review on javascript engine vulnerability mining. In Journal of Physics: Conference Series, Vol. 1744. IOP Publishing, 042197.
[27] The Citizen Lab. 2016. The Million Dollar Dissident: NSO Group's iPhone Zero-Days used against a UAE Human Rights Defender. https://citizenlab.ca/2016/08/million-dollar-dissident-iphonezero-day-nso-group-uae/
[28] Zhiyuan Li, Liang Pan, and Yuan Shi. 2019. Using the JIT Vulnerability to Pwn Microsoft Edge. https://i.blackhat.com/asia-19/Fri-March-29/bh-asia-Li-Using-the-JIT-Vulnerability-to-Pwning-Microsoft-Edge.pdf. Black Hat Asia 2019.
[29] Jungwon Lim, Yonghwi Jin, Mansour Alharthi, Xiaokuan Zhang, Jinho Jung, Rajat Gupta, Kuilin Li, Daehee Jang, and Taesoo Kim. 2021. SOK: On the Analysis of Web Browser Security. https://arxiv.org/abs/2112.15561
[30] Microsoft. 2024. ChakraCore GitHub repository. https://github.com/chakra-core/ChakraCore.
[31] Mozilla. 2024. Mozilla Bugzilla. https://bugzilla.mozilla.org/.
[32] Mozilla. 2024. Mozilla Firefox Security Advisories. https://www.mozilla.org/en-US/security/advisories/.
[33] Mozilla. 2024. Mozilla Security Blog. https://blog.mozilla.org/security/.
[34] Mozilla. 2024. SpiderMonkey GitHub repository. https://github.com/mozilla-spidermonkey.
[35] National Vulnerability Database. 2016. CVE-2016-4657. https://nvd.nist.gov/vuln/detail/CVE-2016-4657.
[36] National Vulnerability Database. 2017. CVE-2017-0234. https://nvd.nist.gov/vuln/detail/CVE-2017-0234.
[37] National Vulnerability Database. 2017. CVE-2017-2531. https://nvd.nist.gov/vuln/detail/CVE-2017-2531.
[38] National Vulnerability Database. 2018. CVE-2018-0777. https://nvd.nist.gov/vuln/detail/CVE-2018-0777.
[39] National Vulnerability Database. 2019. CVE-2019-13728. https://nvd.nist.gov/vuln/detail/CVE-2019-13728.
[40] National Vulnerability Database. 2019. CVE-2019-13764. https://nvd.nist.gov/vuln/detail/CVE-2019-13764.
[41] National Vulnerability Database. 2019. CVE-2019-5755. https://nvd.nist.gov/vuln/detail/CVE-2019-5782.
[42] National Vulnerability Database. 2019. CVE-2019-5782. https://nvd.nist.gov/vuln/detail/CVE-2019-5782.
[43] National Vulnerability Database. 2020. CVE-2020-9802. https://nvd.nist.gov/vuln/detail/CVE-2020-9802.
[44] National Institute of Standards and Technology. 2024. National Vulnerability Database. https://nvd.nist.gov/.
[45] OffensiveCon. 2024. OffensiveCon: The Offensive Security Conference. https://www.offensivecon.org/. Accessed January 7, 2025.
[46] Power of Community Conference. 2025. POC: Power of Community Security Conference. https://powerofcommunity.net/.
[47] Lili Quan, Qianyu Guo, Xiaofei Xie, Sen Chen, Xiaohong Li, and Yang Liu. 2022. Towards understanding the faults of javascript-based deep learning systems. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering. 1–13.
[48] Jesse Ruderman. 2007. Jsfunfuzz. https://github.com/MozillaSecurity/funfuzz.
[49] Qingchao Shen, Haoyang Ma, Junjie Chen, Yongqiang Tian, Shing-Chi Cheung, and Xiang Chen. 2021. A comprehensive study of deep learning compiler bugs. In Proceedings of the 29th ACM Joint meeting on european software engineering conference and symposium on the foundations of software engineering. 968–980.
[50] statcounter. 2025. Browser Market Share Worldwide. https://gs.statcounter.com/browser-market-share
[51] Chengnian Sun, Vu Le, Qirun Zhang, and Zhendong Su. 2016. Toward understanding compiler bugs in GCC and LLVM. In Proceedings of the 25th International Symposium on Software Testing and Analysis. 294–305.
[52] The V8 Team. 2025. Hidden Classes. https://v8.dev/docs/hidden-classes Accessed: 2025-03-13.
[53] w3schools. 2024. The Most Popular Browsers. https://www.w3schools.com/browsers/
[54] W3Techs. 2024. Usage Statistics of JavaScript as Client-side Programming Language on Websites. https://w3techs.com/technologies/details/cp-javascript. Retrieved 27 February 2024.
[55] Junjie Wang, Bihuan Chen, Lei Wei, and Yang Liu. 2019. Superion: Grammar-Aware Greybox Fuzzing. In 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE). 724–735. doi:10.1109/ICSE.2019.00081
[56] Jiming Wang, Yan Kang, Chenggang Wu, Yuhao Hu, Yue Sun, Jikai Ren, Yuanming Lai, Mengyao Xie, Charles Zhang, Tao Li, et al. 2024. OptFuzz: optimization path guided fuzzing for JavaScript JIT compilers. In 33rd USENIX Security Symposium (USENIX Security 24). USENIX Association, 865–882.
[57] Junjie Wang, Zhiyi Zhang, Shuang Liu, Xiaoning Du, and Junjie Chen. 2023. FuzzJIT: Oracle-Enhanced Fuzzing for JavaScript Engine JIT Compiler. In Proceedings of the 32th USENIX Conference on Security Symposium.
[58] Ziyuan Wang, Dexin Bu, Nannan Wang, Sijie Yu, Shanyi Gou, and Aiyue Sun. 2023. An empirical study on bugs in JavaScript engines. Information and Software Technology 155 (2023), 107105.
[59] Zhiyuan Wei, Jing Sun, Zijiang Zhang, Xianhao Zhang, Meng Li, and Zhe Hou. 2024. LLM-SmartAudit: Advanced Smart Contract Vulnerability Detection. arXiv preprint arXiv:2410.09381 (2024).
Yuhan Ma, Jiongchi Yu, Xiaofei Xie, Qiang Hu, Zhiyi Zhang, and Junjie Wang
[60] Michal Zalewski. [n. d.]. American fuzzy lop. http://lcamtuf.coredump.cx/afl.
[61] Zer0Con. 2025. Zer0Con: Advanced Security Conference. https://zer0con.org/.
[62] Zhide Zhou, Zhilei Ren, Guojun Gao, and He Jiang. 2021. An empirical study of optimization bugs in GCC and LLVM. Journal of Systems and Software 174 (2021), 110884.
A Appendix
A.1 Data Collection and Screening
We select the most popular JS engine projects [50, 53], specifically V8, JSC, SM, and CH.
To ensure the comprehensiveness of our dataset, we use the project names as the keywords to search for potential vulnerabilities and collect vulnerability data from multiple sources, including vulnerability databases [8, 44], security advisories [3, 10, 32], bug-tracking systems [2, 11, 31], GitHub repositories [1, 14, 30, 34], research blogs [12, 13, 33], and conferences [20, 25, 45, 46, 61].
In total, we collected 1,215 candidate engine-related CVEs before further screening. We first queried public CVE databases for each engine name. The terms v8 and chakracore returned 325 and 177 CVEs, respectively. For JSC and SM the situation is different: their CVEs are usually reported under the browser projects that embed them (Safari and Firefox). To identify the engine-specific entries, we followed the CVE pages to their linked bug-tracking records, which list the affected component. This triage produced 635 SM CVEs. As many WebKit Bugzilla reports are private, the public CVE record for JSC is incomplete, as we are only able to collect 10 CVEs through standard sources. To compensate, we mined Google Project Zero's public issue tracker [15], ultimately obtaining 78 JSC CVEs. Then we conduct data screening to filter out vulnerabilities that are not out of date or lack sufficient information based on the following criteria:
• From the initial 1,215 engine-related CVEs, we first discarded 638 outdated entries (e.g., those published before 2017), and then removed additional cases lacking sufficient technical detail (e.g., patch links or analysis reports), leaving 371 well-documented candidates.
• Given the significant effort required for manual vulnerability analysis and the constraints of a limited manual analysis budget, we prioritize severe vulnerabilities to balance the depth and breadth of our work. Specifically, we retain only those vulnerabilities with a CVSS score higher than 7.0 (classified as high risk) or those that have received bounty awards, which left us with 241 vulnerabilities.
After data screening, we obtain 241 JS engine vulnerabilities for subsequent manual analysis. We also collect the detailed patch analysis from corresponding bug-tracking systems to better understand the root cause and exploitation of these vulnerabilities. These systems include Chromium's bug tracker [11] for V8, WebKit's Bugzilla [2] for JSC, Mozilla's Bugzilla [31] for SM, and GitHub Issues [30] for CH. From these systems, we obtain bug resolution
Node* control = NodeProperties::GetControlInput(node); Node* regexp = NodeProperties::GetValueInput(node, 1);
- Handle<Map> regexp_initial_map =
- native_context().regexp_function().initial_map().object();
MapInference inference(broker(), regexp, effect);
- if (!inference.HaveMaps() ||
- !inference.AllOfInstanceTypes(InstanceTypeChecker::IsJSRegExp) {
- return inference.NoChange();
- }
- if (!inference.Is(regexp_initial_map)) return inference.NoChange(); MapHandles const& regexp_maps = inference.GetMaps();
Figure 7: A vulnerability in V8 caused by Incorrect Type Handling #CVE-2019-13728
- eliminatedLowerBoundCheck = true;
- eliminatedUpperBoundCheck = true;
- canBailOutOnArrayAccessHelperCall = false;
- if (!GetIsAsmJSFunc()) {
- ...
-
if (idxValue && idxValue->GetValueInfo()->TryGetIntConstantBounds(&idxConstantBounds)) { -
... -
if (lowerBound >= 0 && ((static_cast<int64>(upperBound) << indirScale) < MAX_ASMJS_ARRAYBUFFER_LENGTH)) { -
eliminatedLowerBoundCheck = true; -
eliminatedUpperBoundCheck = true; -
canBailOutOnArrayAccessHelperCall = false; -
... -
} else (...)
Figure 8: A vulnerability in ChakraCore caused by Incorrect Optimization Algorithm #CVE-2017-0234
histories and additional contextual data regarding the vulnerabilities, such as associated exploit scripts and developer comments, which are invaluable for enriching our dataset with practical insights.
To further investigate the exploitation mechanisms for these vulnerabilities, we manually assess their exploitability and obtain 75 cases with exploitable proofs of concept for exploit triggering chain analysis. During our analysis, we additionally consult security blogs (e.g., Google Project Zero) and papers presented at security-related conferences (e.g., Black Hat and Offensive Con) to get detailed analysis reports that provide in-depth exploit analyses, offering insights that are usually not available in official bug databases or advisories.
A.2 Case Study: CVE-2019-13728
Figure 7 illustrates CVE-2019-13728 [39], which is caused by an incorrect type assumption in V8's handling of RegExp objects. V8 incorrectly assumes that unmodified exec methods imply the object retains its original map, checked only by InstanceType. This causes JIT-compiled code to access properties at assumed offsets, resulting in Out-of-Bounds writes when the object's layout changes.
A.3 Case Study: CVE-2017-0234
Figure 8 illustrates CVE-2017-0234 [36], a representative vulnerability caused by an incorrect optimization algorithm in ChakraCore. This issue arises when the JIT compiler incorrectly removes boundary checks for virtual typed arrays, assuming that all array accesses remain within a 4 GB limit. Once this limit is exceeded, Out-of-Bounds writes can occur, potentially leading to memory corruption. The patch addresses this flaw by adding range checks to prevent unsafe boundary check eliminations.
The keyword Safari yields 1 440 CVEs and Firefox 3 329 CVEs, the majority of which originate from non-JS components, including rendering engines, networking stacks, and sandbox.
It is worth noting that analyzing a single vulnerability, including bug characteristic analysis, exploitation, and patch analysis, can be highly time-consuming, taking anywhere from several hours to days depending on its complexity.