{"id":"CVE-2025-62494","aliases":["CVE-2025-62494"],"related":[],"kind":"vulnerability","state":"published","title":"Type confusion in string addition in QuickJS","summary":"A type confusion vulnerability exists in the handling of the string addition (+) operation within the QuickJS engine.\n\n  *  The code first checks if the left-hand operand is a string.\n\n\n  *  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).\n\n\n  *  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).\n\n\n  *  The code then proceeds to call JS_ConcatStringInPlace, which still treats the modified left-hand value as a string.\n\n\nThis 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"A type confusion vulnerability exists in the handling of the string addition (+) operation within the QuickJS engine.\n\n  *  The code first checks if the left-hand operand is a string.\n\n\n  *  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).\n\n\n  *  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).\n\n\n  *  The code then proceeds to call JS_ConcatStringInPlace, which still treats the modified left-hand value as a string.\n\n\nThis 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.","source":"cvelist"},{"lang":"es","text":"Existe una vulnerabilidad de confusión de tipos en el manejo de la operación de adición de cadenas (+) dentro del motor QuickJS.\n\n  * El código primero verifica si el operando de la izquierda es una cadena.\n\n  * Luego intenta convertir el operando de la derecha a un valor primitivo usando JS_ToPrimitiveFree. Esta conversión puede activar una devolución de llamada (por ejemplo, toString o valueOf).\n\n  * Durante esta devolución de llamada, un atacante puede modificar el tipo del operando de la izquierda en memoria, cambiándolo de una cadena a un tipo diferente (por ejemplo, un objeto o un array).\n\n  * El código luego procede a llamar a JS_ConcatStringInPlace, que aún trata el valor de la izquierda modificado como una cadena.\n\nEste desajuste entre el tipo asumido (cadena) y el tipo real permite a un atacante controlar la estructura de datos que está siendo procesada por la lógica de concatenación, lo que resulta en una condición de confusión de tipos. Esto puede llevar a un acceso a memoria fuera de límites, lo que podría resultar en corrupción de memoria y ejecución de código arbitrario en el contexto del entorno de ejecución de QuickJS.","source":"nvd"}],"published":"2025-10-16T15:51:50.977Z","modified":"2026-10-19T16:10:00.260Z","severity":{"scorer":"Google","scheme":"CVSS:4.0","vector":"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","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"Google","scheme":"CVSS:4.0","vector":"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","score":7.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"}],"cwes":["CWE-704"],"affected":[{"ranges":[{"type":"date","introduced":"2025-04-26","fixed":"2025-09-13","status":"affected"}],"vendor":"QuickJS","product":"QuickJS","package":"JS_ConcatStringInPlace","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"2025-09-13"}],"vendor":"quickjs_project","product":"quickjs","cpe":"cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://bellard.org/quickjs/Changelog","tags":["release-notes"],"sources":["cvelist","nvd"]},{"url":"https://issuetracker.google.com/434193023","tags":["exploit","issue-tracking"],"sources":["cvelist","nvd"]}],"credits":["Google Big Sleep"],"assigner":"Google","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2025-10-16T17:46:18.542Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-62494","url":"https://www.cve.org/CVERecord?id=CVE-2025-62494","licence":"CVE Terms of Use","modified":"2025-10-16T17:46:39.174Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-62494","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-62494","licence":"Public domain","modified":"2026-10-19T16:10:00.260Z"}],"updatedAt":"2026-11-25T22:59:06.498Z","epss":{"score":0.00526,"percentile":0.46017,"date":"2026-12-01T12:00:22.000Z"}}