CVE-2025-62492
Full vulnerability record from the local CVENow database.
Description
A vulnerability stemming from floating-point arithmetic precision errors exists in the QuickJS engine's implementation of TypedArray.prototype.indexOf() when a negative fromIndex argument is supplied. * The fromIndex argument (read as a double variable, $d$) is used to calculate the starting position for the search. * If d is negative, the index is calculated relative to the end of the array by adding the array's length (len) to d: $$d_{new} = d + \text{len}$$ * Due to the inherent limitations of floating-point arithmetic, if the negative value $d$ is extremely small (e.g., $-1 \times 10^{-20}$), the addition $d + \text{len}$ can result in a loss of precision, yielding an outcome that is exactly equal to $\text{len}$. * The result is then converted to an integer index $k$: $k = \text{len}$. * The search function proceeds to read array elements starting from index $k$. Since valid indices are $0$ to $\text{len}-1$, starting the read at index $\text{len}$ is one element past the end of the array. This allows an attacker to cause an Out-of-Bounds Read of one element immediately following the buffer. While the scope of this read is small (one element), it can potentially lead to Information Disclosure of adjacent memory contents, depending on the execution environment.
View original CVE JSON
{
"id": "CVE-2025-62492",
"sourceIdentifier": "[email protected]",
"published": "2025-10-16T16:15:39.620",
"lastModified": "2026-10-19T16:10:00.260",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "A vulnerability stemming from floating-point arithmetic precision errors exists in the QuickJS engine's implementation of TypedArray.prototype.indexOf() when a negative fromIndex argument is supplied.\n\n * The fromIndex argument (read as a double variable, $d$) is used to calculate the starting position for the search.\n\n\n * If d is negative, the index is calculated relative to the end of the array by adding the array's length (len) to d:\n\n\n\n$$d_{new} = d + \\text{len}$$\n\n\n * Due to the inherent limitations of floating-point arithmetic, if the negative value $d$ is extremely small (e.g., $-1 \\times 10^{-20}$), the addition $d + \\text{len}$ can result in a loss of precision, yielding an outcome that is exactly equal to $\\text{len}$.\n\n\n * The result is then converted to an integer index $k$: $k = \\text{len}$.\n\n\n * The search function proceeds to read array elements starting from index $k$. Since valid indices are $0$ to $\\text{len}-1$, starting the read at index $\\text{len}$ is one element past the end of the array.\n\n\nThis allows an attacker to cause an Out-of-Bounds Read of one element immediately following the buffer. While the scope of this read is small (one element), it can potentially lead to Information Disclosure of adjacent memory contents, depending on the execution environment."
},
{
"lang": "es",
"value": "Una vulnerabilidad derivada de errores de precisión en aritmética de punto flotante existe en la implementación del motor QuickJS de TypedArray.prototype.indexOf() cuando se proporciona un argumento fromIndex negativo.\n\n * El argumento fromIndex (leído como una variable de tipo double, $d$) se utiliza para calcular la posición inicial para la búsqueda.\n\n\n * Si $d$ es negativo, el índice se calcula en relación con el final del array sumando la longitud del array (len) a $d$:\n\n\n\n$$d_{new} = d + \\text{len}$$\n\n\n * Debido a las limitaciones inherentes de la aritmética de punto flotante, si el valor negativo $d$ es extremadamente pequeño (p. ej., $-1 \\times 10^{-20}$), la suma $d + \\text{len}$ puede resultar en una pérdida de precisión, produciendo un resultado que es exactamente igual a $\\text{len}$.\n\n\n * El resultado se convierte entonces en un índice entero $k$: $k = \\text{len}$.\n\n\n * La función de búsqueda procede a leer elementos del array comenzando desde el índice $k$. Dado que los índices válidos son de $0$ a $\\text{len}-1$, iniciar la lectura en el índice $\\text{len}$ es un elemento más allá del final del array.\n\n\nEsto permite a un atacante causar una lectura fuera de límites (Out-of-Bounds Read) de un elemento inmediatamente después del búfer. Aunque el alcance de esta lectura es pequeño (un elemento), puede conducir potencialmente a la revelación de información (Information Disclosure) de contenidos de memoria adyacentes, dependiendo del entorno de ejecución."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "QuickJS",
"product": "QuickJS",
"defaultStatus": "unaffected",
"collectionURL": "https://bellard.org/quickjs/",
"packageName": "js_typed_array_indexOf",
"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:L/VA:L/SC:H/SI:L/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": 5.9,
"baseSeverity": "MEDIUM",
"attackVector": "ADJACENT",
"attackComplexity": "HIGH",
"attackRequirements": "PRESENT",
"privilegesRequired": "LOW",
"userInteraction": "PASSIVE",
"vulnConfidentialityImpact": "HIGH",
"vulnIntegrityImpact": "LOW",
"vulnAvailabilityImpact": "LOW",
"subConfidentialityImpact": "HIGH",
"subIntegrityImpact": "LOW",
"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:N/A:N",
"baseScore": 6.5,
"baseSeverity": "MEDIUM",
"attackVector": "ADJACENT_NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 2.8,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2025-10-16T18:01:27.698649Z",
"id": "CVE-2025-62492",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-125"
}
]
}
],
"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/434194797",
"source": "[email protected]",
"tags": [
"Exploit",
"Issue Tracking"
]
}
]
}