CVE-2025-62494
Full vulnerability record from the local CVENow database.
Description
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.
View original CVE JSON
{
"id": "CVE-2025-62494",
"sourceIdentifier": "[email protected]",
"published": "2025-10-16T16:15:39.943",
"lastModified": "2026-10-19T16:10:00.260",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "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."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "QuickJS",
"product": "QuickJS",
"defaultStatus": "unaffected",
"collectionURL": "https://bellard.org/quickjs/",
"packageName": "JS_ConcatStringInPlace",
"versions": [
{
"version": "2025-04-26",
"lessThan": "2025-09-13",
"versionType": "date",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV40": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "4.0",
"vectorString": "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/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",
"baseScore": 7.1,
"baseSeverity": "HIGH",
"attackVector": "ADJACENT",
"attackComplexity": "HIGH",
"attackRequirements": "PRESENT",
"privilegesRequired": "LOW",
"userInteraction": "PASSIVE",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "HIGH",
"vulnAvailabilityImpact": "LOW",
"subConfidentialityImpact": "HIGH",
"subIntegrityImpact": "HIGH",
"subAvailabilityImpact": "LOW",
"exploitMaturity": "NOT_DEFINED",
"confidentialityRequirement": "NOT_DEFINED",
"integrityRequirement": "NOT_DEFINED",
"availabilityRequirement": "NOT_DEFINED",
"modifiedAttackVector": "NOT_DEFINED",
"modifiedAttackComplexity": "NOT_DEFINED",
"modifiedAttackRequirements": "NOT_DEFINED",
"modifiedPrivilegesRequired": "NOT_DEFINED",
"modifiedUserInteraction": "NOT_DEFINED",
"modifiedVulnConfidentialityImpact": "NOT_DEFINED",
"modifiedVulnIntegrityImpact": "NOT_DEFINED",
"modifiedVulnAvailabilityImpact": "NOT_DEFINED",
"modifiedSubConfidentialityImpact": "NOT_DEFINED",
"modifiedSubIntegrityImpact": "NOT_DEFINED",
"modifiedSubAvailabilityImpact": "NOT_DEFINED",
"Safety": "NOT_DEFINED",
"Automatable": "NOT_DEFINED",
"Recovery": "NOT_DEFINED",
"valueDensity": "NOT_DEFINED",
"vulnerabilityResponseEffort": "NOT_DEFINED",
"providerUrgency": "NOT_DEFINED"
}
}
],
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Primary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"baseScore": 8.8,
"baseSeverity": "HIGH",
"attackVector": "ADJACENT_NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 2.8,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2025-10-16T17:46:18.542287Z",
"id": "CVE-2025-62494",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-704"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:*",
"versionEndExcluding": "2025-09-13",
"matchCriteriaId": "AB84E2DC-74EA-4956-9521-C2B652B8E8C2"
}
]
}
]
}
],
"references": [
{
"url": "https://bellard.org/quickjs/Changelog",
"source": "[email protected]",
"tags": [
"Release Notes"
]
},
{
"url": "https://issuetracker.google.com/434193023",
"source": "[email protected]",
"tags": [
"Exploit",
"Issue Tracking"
]
}
]
}