8.8
HIGH CVSS 3.1
CVE-2025-62495
Type confusion in string addition in QuickJS
Description

An integer overflow vulnerability exists in the QuickJS regular expression engine (libregexp) due to an inconsistent representation of the bytecode buffer size. * The regular expression bytecode is stored in a DynBuf structure, which correctly uses a $\text{size}\_\text{t}$ (an unsigned type, typically 64-bit) for its size member. * However, several functions, such as re_emit_op_u32 and other internal parsing routines, incorrectly cast or store this DynBuf $\text{size}\_\text{t}$ value into a signed int (typically 32-bit). * When a large or complex regular expression (such as those generated by a recursive pattern in a Proof-of-Concept) causes the bytecode size to exceed $2^{31}$ bytes (the maximum positive value for a signed 32-bit integer), the size value wraps around, resulting in a negative integer when stored in the int variable (Integer Overflow). * This negative value is subsequently used in offset calculations. For example, within functions like re_parse_disjunction, the negative size is used to compute an offset (pos) for patching a jump instruction. * This negative offset is then incorrectly added to the buffer pointer (s->byte\_code.buf + pos), leading to an out-of-bounds write on the first line of the snippet below: put_u32(s->byte_code.buf + pos, len);

INFO

Published Date :

Oct. 16, 2025, 4:15 p.m.

Last Modified :

Oct. 19, 2026, 4:10 p.m.

Remotely Exploit :

No
Affected Products

The following products are affected by CVE-2025-62495 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Quickjs_project quickjs
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 3.1 HIGH [email protected]
CVSS 4.0 HIGH 14ed7db2-1595-443d-9d34-6215bf890778
CVSS 4.0 HIGH [email protected]
Solution
Fix integer overflow by consistently using unsigned types for size and offset calculations.
  • Use unsigned types for buffer size and offsets.
  • Validate buffer sizes before casting to signed integers.
  • Apply patches to the regular expression engine.
  • Update the QuickJS library to the latest version.
Public PoC/Exploit Available at Github

CVE-2025-62495 has a 1 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2025-62495.

URL Resource
https://bellard.org/quickjs/Changelog Release Notes
https://issuetracker.google.com/434196926 Exploit Issue Tracking
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2025-62495 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2025-62495 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Tracking CVEs discovered by AI systems — Anthropic, OpenAI, Google Big Sleep, Microsoft MDASH, DepthFirst

Updated: 3 months, 2 weeks ago
1 stars 0 fork 0 watcher
Born at : May 26, 2026, 1:31 a.m. This repo has been linked 208 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2025-62495 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2025-62495 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Translated by [email protected]

    Oct. 19, 2026

    Action Type Old Value New Value
    Added Translation Title: QuickJS, Description: Existe una vulnerabilidad de desbordamiento de entero en el motor de expresiones regulares QuickJS (libregexp) debido a una representación inconsistente del tamaño del búfer de bytecode. * El bytecode de la expresión regular se almacena en una estructura DynBuf, que utiliza correctamente un $\text{size}\_\text{t}$ (un tipo sin signo, típicamente de 64 bits) para su miembro de tamaño. * Sin embargo, varias funciones, como re_emit_op_u32 y otras rutinas de análisis internas, convierten o almacenan incorrectamente este valor $\text{size}\_\text{t}$ de DynBuf en un int con signo (típicamente de 32 bits). * Cuando una expresión regular grande o compleja (como las generadas por un patrón recursivo en una Prueba de Concepto) hace que el tamaño del bytecode exceda los $2^{31}$ bytes (el valor positivo máximo para un entero con signo de 32 bits), el valor del tamaño se ajusta, resultando en un entero negativo cuando se almacena en la variable int (Desbordamiento de Entero). * Este valor negativo se utiliza posteriormente en cálculos de desplazamiento. Por ejemplo, dentro de funciones como re_parse_disjunction, el tamaño negativo se utiliza para calcular un desplazamiento (pos) para parchear una instrucción de salto. * Este desplazamiento negativo se añade incorrectamente al puntero del búfer (s -> byte\_code.buf + pos), lo que lleva a una escritura fuera de límites en la primera línea del fragmento siguiente: put_u32(s -> byte_code.buf + pos, len);
  • CVE Modified by [email protected]

    Jun. 17, 2026

    Action Type Old Value New Value
    Added Affected [{'vendor': 'QuickJS', 'product': 'QuickJS', 'versions': [{'status': 'affected', 'version': '2025-04-26', 'lessThan': '2025-09-13', 'versionType': 'date'}], 'packageName': 'libregexp', 'collectionURL': 'https://bellard.org/quickjs/', 'defaultStatus': 'unaffected'}]
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Jun. 17, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2025-62495', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2025-10-16T17:40:14.439633Z'}
  • Initial Analysis by [email protected]

    Oct. 29, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Added CPE Configuration OR *cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:* versions up to (excluding) 2025-09-13
    Added Reference Type Google Inc.: https://bellard.org/quickjs/Changelog Types: Release Notes
    Added Reference Type Google Inc.: https://issuetracker.google.com/434196926 Types: Exploit, Issue Tracking
  • New CVE Received by [email protected]

    Oct. 16, 2025

    Action Type Old Value New Value
    Added Description An integer overflow vulnerability exists in the QuickJS regular expression engine (libregexp) due to an inconsistent representation of the bytecode buffer size. * The regular expression bytecode is stored in a DynBuf structure, which correctly uses a $\text{size}\_\text{t}$ (an unsigned type, typically 64-bit) for its size member. * However, several functions, such as re_emit_op_u32 and other internal parsing routines, incorrectly cast or store this DynBuf $\text{size}\_\text{t}$ value into a signed int (typically 32-bit). * When a large or complex regular expression (such as those generated by a recursive pattern in a Proof-of-Concept) causes the bytecode size to exceed $2^{31}$ bytes (the maximum positive value for a signed 32-bit integer), the size value wraps around, resulting in a negative integer when stored in the int variable (Integer Overflow). * This negative value is subsequently used in offset calculations. For example, within functions like re_parse_disjunction, the negative size is used to compute an offset (pos) for patching a jump instruction. * This negative offset is then incorrectly added to the buffer pointer (s->byte\_code.buf + pos), leading to an out-of-bounds write on the first line of the snippet below: put_u32(s->byte_code.buf + pos, len);
    Added CVSS V4.0 AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-191
    Added Reference https://bellard.org/quickjs/Changelog
    Added Reference https://issuetracker.google.com/434196926
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.