CVE-2025-62493 (GCVE-0-2025-62493)

Vulnerability from cvelistv5 – Published: 2025-10-16 15:51 – Updated: 2025-10-16 17:59
VLAI
Title
Heap out-of-bounds read in js_bigint_to_string1 in QuickJS
Summary
A vulnerability exists in the QuickJS engine's BigInt string conversion logic (js_bigint_to_string1) due to an incorrect calculation of the required number of digits, which in turn leads to reading memory past the allocated BigInt structure. * The function determines the number of characters (n_digits) needed for the string representation by calculating: $$ \\ \text{n\_digits} = (\text{n\_bits} + \text{log2\_radix} - 1) / \text{log2\_radix}$$ $$$$This formula is off-by-one in certain edge cases when calculating the necessary memory limbs. For instance, a 127-bit BigInt using radix 32 (where $\text{log2\_radix}=5$) is calculated to need $\text{n\_digits}=26$. * The maximum number of bits actually stored is $\text{n\_bits}=127$, which requires only two 64-bit limbs ($\text{JS\_LIMB\_BITS}=64$). * The conversion loop iterates $\text{n\_digits}=26$ times, attempting to read 5 bits in each iteration, totaling $26 \times 5 = 130$ bits. * In the final iterations of the loop, the code attempts to read data that spans two limbs: C c = (r->tab[pos] >> shift) | (r->tab[pos + 1] << (JS_LIMB_BITS - shift)); * Since the BigInt was only allocated two limbs, the read operation for r->tab[pos + 1] becomes an Out-of-Bounds Read when pos points to the last valid limb (e.g., $pos=1$). This vulnerability allows an attacker to cause the engine to read and process data from the memory immediately following the BigInt buffer. This can lead to Information Disclosure of sensitive data stored on the heap adjacent to the BigInt object.
SSVC
Exploitation: poc Automatable: no Technical Impact: partial
CISA Coordinator · CISA-ADP (v2.0.3)
Decision recorded 2025-10-16 17:56 UTC
CWE
Assigner
Google CNA under the Google root
CNA scorecard B 77/100 over 40 records in the last 180 days details
Impacted products
Vendor Product Version CPE status
QuickJS QuickJS Affected: 2025-04-26 , < 2025-09-13 (date)
guessed Create a notification for this product.
Date Public
2025-07-24 22:00
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2025-62493",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-10-16T17:56:52.934146Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-10-16T17:59:10.306Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://bellard.org/quickjs/",
          "defaultStatus": "unaffected",
          "packageName": "js_bigint_to_string1",
          "product": "QuickJS",
          "vendor": "QuickJS",
          "versions": [
            {
              "lessThan": "2025-09-13",
              "status": "affected",
              "version": "2025-04-26",
              "versionType": "date"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "type": "finder",
          "value": "Google Big Sleep"
        }
      ],
      "datePublic": "2025-07-24T22:00:00.000Z",
      "descriptions": [
        {
          "lang": "en",
          "supportingMedia": [
            {
              "base64": false,
              "type": "text/html",
              "value": "\u003cp\u003eA vulnerability exists in the QuickJS engine\u0027s BigInt string conversion logic (\u003ccode\u003ejs_bigint_to_string1\u003c/code\u003e) due to an incorrect calculation of the required number of digits, which in turn leads to reading memory past the allocated BigInt structure.\u003c/p\u003e\u003col\u003e\u003cli\u003e\u003cp\u003eThe function determines the number of characters (\u003ccode\u003en_digits\u003c/code\u003e) needed for the string representation by calculating:\u003c/p\u003e\u003cdiv\u003e$$ \\\\ \\text{n\\_digits} = (\\text{n\\_bits} + \\text{log2\\_radix} - 1) / \\text{log2\\_radix}$$\u003c/div\u003e\u003cp\u003e$$$$This formula is \u003cb\u003eoff-by-one\u003c/b\u003e in certain edge cases when calculating the necessary memory limbs. For instance, a 127-bit BigInt using radix 32 (where $\\text{log2\\_radix}=5$) is calculated to need $\\text{n\\_digits}=26$.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eThe maximum number of bits actually stored is $\\text{n\\_bits}=127$, which requires only two 64-bit limbs ($\\text{JS\\_LIMB\\_BITS}=64$).\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eThe conversion loop iterates \u003cb\u003e$\\text{n\\_digits}=26$ times\u003c/b\u003e, attempting to read 5 bits in each iteration, totaling $26 \\times 5 = 130$ bits.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eIn the final iterations of the loop, the code attempts to read data that spans two limbs:\u003c/p\u003e\u003cdiv\u003e\u003cdiv\u003eC\u003cdiv\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv\u003e\u003cdiv\u003e\u003cpre\u003e\u003ccode\u003ec = (r-\u0026gt;tab[pos] \u0026gt;\u0026gt; shift) | (r-\u0026gt;tab[pos + 1] \u0026lt;\u0026lt; (JS_LIMB_BITS - shift));\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eSince the BigInt was only allocated two limbs, the read operation for \u003ccode\u003er-\u0026gt;tab[pos + 1]\u003c/code\u003e becomes an \u003cb\u003eOut-of-Bounds Read\u003c/b\u003e when \u003ccode\u003epos\u003c/code\u003e points to the last valid limb (e.g., $pos=1$).\u003c/p\u003e\u003c/li\u003e\u003c/ol\u003e\u003cp\u003eThis vulnerability allows an attacker to cause the engine to read and process data from the memory immediately following the BigInt buffer. This can lead to \u003cb\u003eInformation Disclosure\u003c/b\u003e of sensitive data stored on the heap adjacent to the BigInt object.\u003c/p\u003e\u003cbr\u003e"
            }
          ],
          "value": "A vulnerability exists in the QuickJS engine\u0027s BigInt string conversion logic (js_bigint_to_string1) due to an incorrect calculation of the required number of digits, which in turn leads to reading memory past the allocated BigInt structure.\n\n  *  The function determines the number of characters (n_digits) needed for the string representation by calculating:\n\n$$ \\\\ \\text{n\\_digits} = (\\text{n\\_bits} + \\text{log2\\_radix} - 1) / \\text{log2\\_radix}$$\n\n$$$$This formula is off-by-one in certain edge cases when calculating the necessary memory limbs. For instance, a 127-bit BigInt using radix 32 (where $\\text{log2\\_radix}=5$) is calculated to need $\\text{n\\_digits}=26$.\n\n\n  *  The maximum number of bits actually stored is $\\text{n\\_bits}=127$, which requires only two 64-bit limbs ($\\text{JS\\_LIMB\\_BITS}=64$).\n\n\n  *  The conversion loop iterates $\\text{n\\_digits}=26$ times, attempting to read 5 bits in each iteration, totaling $26 \\times 5 = 130$ bits.\n\n\n  *  In the final iterations of the loop, the code attempts to read data that spans two limbs:\n\nC\n\n\n\nc = (r-\u003etab[pos] \u003e\u003e shift) | (r-\u003etab[pos + 1] \u003c\u003c (JS_LIMB_BITS - shift));\n\n\n\n\n\n\n\n\n\n  *  Since the BigInt was only allocated two limbs, the read operation for r-\u003etab[pos + 1] becomes an Out-of-Bounds Read when pos points to the last valid limb (e.g., $pos=1$).\n\n\nThis vulnerability allows an attacker to cause the engine to read and process data from the memory immediately following the BigInt buffer. This can lead to Information Disclosure of sensitive data stored on the heap adjacent to the BigInt object."
        }
      ],
      "impacts": [
        {
          "capecId": "CAPEC-175",
          "descriptions": [
            {
              "lang": "en",
              "value": "CAPEC-175 Code Inclusion"
            }
          ]
        }
      ],
      "metrics": [
        {
          "cvssV4_0": {
            "Automatable": "NOT_DEFINED",
            "Recovery": "NOT_DEFINED",
            "Safety": "NOT_DEFINED",
            "attackComplexity": "HIGH",
            "attackRequirements": "PRESENT",
            "attackVector": "ADJACENT",
            "baseScore": 5.9,
            "baseSeverity": "MEDIUM",
            "privilegesRequired": "LOW",
            "providerUrgency": "NOT_DEFINED",
            "subAvailabilityImpact": "LOW",
            "subConfidentialityImpact": "HIGH",
            "subIntegrityImpact": "LOW",
            "userInteraction": "PASSIVE",
            "valueDensity": "NOT_DEFINED",
            "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",
            "version": "4.0",
            "vulnAvailabilityImpact": "LOW",
            "vulnConfidentialityImpact": "HIGH",
            "vulnIntegrityImpact": "LOW",
            "vulnerabilityResponseEffort": "NOT_DEFINED"
          },
          "format": "CVSS",
          "scenarios": [
            {
              "lang": "en",
              "value": "GENERAL"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "cweId": "CWE-125",
              "description": "CWE-125 Out-of-bounds Read",
              "lang": "en",
              "type": "CWE"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-10-16T15:51:42.952Z",
        "orgId": "14ed7db2-1595-443d-9d34-6215bf890778",
        "shortName": "Google"
      },
      "references": [
        {
          "url": "https://bellard.org/quickjs/Changelog"
        },
        {
          "url": "https://issuetracker.google.com/434193024"
        }
      ],
      "source": {
        "discovery": "UNKNOWN"
      },
      "title": "Heap out-of-bounds read in js_bigint_to_string1 in QuickJS",
      "x_generator": {
        "engine": "Vulnogram 0.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "14ed7db2-1595-443d-9d34-6215bf890778",
    "assignerShortName": "Google",
    "cveId": "CVE-2025-62493",
    "datePublished": "2025-10-16T15:51:42.952Z",
    "dateReserved": "2025-10-15T08:47:41.878Z",
    "dateUpdated": "2025-10-16T17:59:10.306Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2025-62493",
      "date": "2026-11-06",
      "epss": "0.00391",
      "percentile": "0.33379"
    },
    "nvd": {
      "cve": {
        "affected": [
          {
            "affectedData": [
              {
                "collectionURL": "https://bellard.org/quickjs/",
                "defaultStatus": "unaffected",
                "packageName": "js_bigint_to_string1",
                "product": "QuickJS",
                "vendor": "QuickJS",
                "versions": [
                  {
                    "lessThan": "2025-09-13",
                    "status": "affected",
                    "version": "2025-04-26",
                    "versionType": "date"
                  }
                ]
              }
            ],
            "source": "cve-coordination@google.com"
          }
        ],
        "configurations": [
          {
            "nodes": [
              {
                "cpeMatch": [
                  {
                    "criteria": "cpe:2.3:a:quickjs_project:quickjs:*:*:*:*:*:*:*:*",
                    "matchCriteriaId": "AB84E2DC-74EA-4956-9521-C2B652B8E8C2",
                    "versionEndExcluding": "2025-09-13",
                    "vulnerable": true
                  }
                ],
                "negate": false,
                "operator": "OR"
              }
            ]
          }
        ],
        "cveTags": [],
        "descriptions": [
          {
            "lang": "en",
            "value": "A vulnerability exists in the QuickJS engine\u0027s BigInt string conversion logic (js_bigint_to_string1) due to an incorrect calculation of the required number of digits, which in turn leads to reading memory past the allocated BigInt structure.\n\n  *  The function determines the number of characters (n_digits) needed for the string representation by calculating:\n\n$$ \\\\ \\text{n\\_digits} = (\\text{n\\_bits} + \\text{log2\\_radix} - 1) / \\text{log2\\_radix}$$\n\n$$$$This formula is off-by-one in certain edge cases when calculating the necessary memory limbs. For instance, a 127-bit BigInt using radix 32 (where $\\text{log2\\_radix}=5$) is calculated to need $\\text{n\\_digits}=26$.\n\n\n  *  The maximum number of bits actually stored is $\\text{n\\_bits}=127$, which requires only two 64-bit limbs ($\\text{JS\\_LIMB\\_BITS}=64$).\n\n\n  *  The conversion loop iterates $\\text{n\\_digits}=26$ times, attempting to read 5 bits in each iteration, totaling $26 \\times 5 = 130$ bits.\n\n\n  *  In the final iterations of the loop, the code attempts to read data that spans two limbs:\n\nC\n\n\n\nc = (r-\u003etab[pos] \u003e\u003e shift) | (r-\u003etab[pos + 1] \u003c\u003c (JS_LIMB_BITS - shift));\n\n\n\n\n\n\n\n\n\n  *  Since the BigInt was only allocated two limbs, the read operation for r-\u003etab[pos + 1] becomes an Out-of-Bounds Read when pos points to the last valid limb (e.g., $pos=1$).\n\n\nThis vulnerability allows an attacker to cause the engine to read and process data from the memory immediately following the BigInt buffer. This can lead to Information Disclosure of sensitive data stored on the heap adjacent to the BigInt object."
          },
          {
            "lang": "es",
            "value": "Una vulnerabilidad existe en la l\u00f3gica de conversi\u00f3n de cadena de BigInt del motor QuickJS (js_bigint_to_string1) debido a un c\u00e1lculo incorrecto del n\u00famero de d\u00edgitos requerido, lo que a su vez lleva a la lectura de memoria m\u00e1s all\u00e1 de la estructura BigInt asignada.\n\n  *  La funci\u00f3n determina el n\u00famero de caracteres (n_digits) necesarios para la representaci\u00f3n de cadena mediante el c\u00e1lculo:\n\n$$ \\\\ \\text{n\\_digits} = (\\text{n\\_bits} + \\text{log2\\_radix} - 1) / \\text{log2\\_radix}$$\n\nEsta f\u00f3rmula tiene un error de uno en ciertos casos l\u00edmite al calcular los \u0027limbs\u0027 de memoria necesarios. Por ejemplo, se calcula que un BigInt de 127 bits que usa una base 32 (donde $\\text{log2\\_radix}=5$) necesita $\\text{n\\_digits}=26$.\n\n  *  El n\u00famero m\u00e1ximo de bits realmente almacenados es $\\text{n\\_bits}=127$, lo que requiere solo dos \u0027limbs\u0027 de 64 bits ($\\text{JS\\_LIMB\\_BITS}=64$).\n\n  *  El bucle de conversi\u00f3n itera $\\text{n\\_digits}=26$ veces, intentando leer 5 bits en cada iteraci\u00f3n, sumando un total de $26 \\times 5 = 130$ bits.\n\n  *  En las iteraciones finales del bucle, el c\u00f3digo intenta leer datos que abarcan dos \u0027limbs\u0027:\n\nC\n\nc = (r -\u003e tab[pos] \u003e\u003e shift) | (r -\u003e tab[pos + 1] \u003c\u003c (JS_LIMB_BITS - shift));\n\nDado que el BigInt solo se asign\u00f3 con dos \u0027limbs\u0027, la operaci\u00f3n de lectura para r -\u003e tab[pos + 1] se convierte en una lectura fuera de l\u00edmites (Out-of-Bounds Read) cuando \u0027pos\u0027 apunta al \u00faltimo \u0027limb\u0027 v\u00e1lido (por ejemplo, $pos=1$).\n\nEsta vulnerabilidad permite a un atacante hacer que el motor lea y procese datos de la memoria inmediatamente posterior al b\u00fafer BigInt. Esto puede llevar a la revelaci\u00f3n de informaci\u00f3n de datos sensibles almacenados en el \u0027heap\u0027 adyacente al objeto BigInt."
          }
        ],
        "id": "CVE-2025-62493",
        "lastModified": "2026-10-19T16:10:00.260",
        "metrics": {
          "cvssMetricV31": [
            {
              "cvssData": {
                "attackComplexity": "LOW",
                "attackVector": "ADJACENT_NETWORK",
                "availabilityImpact": "NONE",
                "baseScore": 6.5,
                "baseSeverity": "MEDIUM",
                "confidentialityImpact": "HIGH",
                "integrityImpact": "NONE",
                "privilegesRequired": "NONE",
                "scope": "UNCHANGED",
                "userInteraction": "NONE",
                "vectorString": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
                "version": "3.1"
              },
              "exploitabilityScore": 2.8,
              "impactScore": 3.6,
              "source": "nvd@nist.gov",
              "type": "Primary"
            }
          ],
          "cvssMetricV40": [
            {
              "cvssData": {
                "Automatable": "NOT_DEFINED",
                "Recovery": "NOT_DEFINED",
                "Safety": "NOT_DEFINED",
                "attackComplexity": "HIGH",
                "attackRequirements": "PRESENT",
                "attackVector": "ADJACENT",
                "availabilityRequirement": "NOT_DEFINED",
                "baseScore": 5.9,
                "baseSeverity": "MEDIUM",
                "confidentialityRequirement": "NOT_DEFINED",
                "exploitMaturity": "NOT_DEFINED",
                "integrityRequirement": "NOT_DEFINED",
                "modifiedAttackComplexity": "NOT_DEFINED",
                "modifiedAttackRequirements": "NOT_DEFINED",
                "modifiedAttackVector": "NOT_DEFINED",
                "modifiedPrivilegesRequired": "NOT_DEFINED",
                "modifiedSubAvailabilityImpact": "NOT_DEFINED",
                "modifiedSubConfidentialityImpact": "NOT_DEFINED",
                "modifiedSubIntegrityImpact": "NOT_DEFINED",
                "modifiedUserInteraction": "NOT_DEFINED",
                "modifiedVulnAvailabilityImpact": "NOT_DEFINED",
                "modifiedVulnConfidentialityImpact": "NOT_DEFINED",
                "modifiedVulnIntegrityImpact": "NOT_DEFINED",
                "privilegesRequired": "LOW",
                "providerUrgency": "NOT_DEFINED",
                "subAvailabilityImpact": "LOW",
                "subConfidentialityImpact": "HIGH",
                "subIntegrityImpact": "LOW",
                "userInteraction": "PASSIVE",
                "valueDensity": "NOT_DEFINED",
                "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",
                "version": "4.0",
                "vulnAvailabilityImpact": "LOW",
                "vulnConfidentialityImpact": "HIGH",
                "vulnIntegrityImpact": "LOW",
                "vulnerabilityResponseEffort": "NOT_DEFINED"
              },
              "source": "cve-coordination@google.com",
              "type": "Secondary"
            }
          ],
          "ssvcV203": [
            {
              "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "ssvcData": {
                "id": "CVE-2025-62493",
                "options": [
                  {
                    "exploitation": "poc"
                  },
                  {
                    "automatable": "no"
                  },
                  {
                    "technicalImpact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-10-16T17:56:52.934146Z",
                "version": "2.0.3"
              }
            }
          ]
        },
        "published": "2025-10-16T16:15:39.797",
        "references": [
          {
            "source": "cve-coordination@google.com",
            "tags": [
              "Release Notes"
            ],
            "url": "https://bellard.org/quickjs/Changelog"
          },
          {
            "source": "cve-coordination@google.com",
            "tags": [
              "Exploit",
              "Issue Tracking"
            ],
            "url": "https://issuetracker.google.com/434193024"
          }
        ],
        "sourceIdentifier": "cve-coordination@google.com",
        "vulnStatus": "Analyzed",
        "weaknesses": [
          {
            "description": [
              {
                "lang": "en",
                "value": "CWE-125"
              }
            ],
            "source": "cve-coordination@google.com",
            "type": "Secondary"
          }
        ]
      }
    },
    "redhat_vex": {
      "current_release_date": "2025-10-21T18:33:04+00:00",
      "cve": "CVE-2025-62493",
      "id": "CVE-2025-62493",
      "initial_release_date": "2025-07-24T22:00:00+00:00",
      "product_status:known_not_affected": "1",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "Heap out-of-bounds read in js_bigint_to_string1 in QuickJS",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-62493.json",
      "version": "3"
    },
    "vulnrichment": {
      "containers": {
        "adp": [
          {
            "metrics": [
              {
                "other": {
                  "content": {
                    "id": "CVE-2025-62493",
                    "options": [
                      {
                        "Exploitation": "poc"
                      },
                      {
                        "Automatable": "no"
                      },
                      {
                        "Technical Impact": "partial"
                      }
                    ],
                    "role": "CISA Coordinator",
                    "timestamp": "2025-10-16T17:56:52.934146Z",
                    "version": "2.0.3"
                  },
                  "type": "ssvc"
                }
              }
            ],
            "providerMetadata": {
              "dateUpdated": "2025-10-16T17:58:14.720Z",
              "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
              "shortName": "CISA-ADP"
            },
            "title": "CISA ADP Vulnrichment"
          }
        ],
        "cna": {
          "affected": [
            {
              "collectionURL": "https://bellard.org/quickjs/",
              "defaultStatus": "unaffected",
              "packageName": "js_bigint_to_string1",
              "product": "QuickJS",
              "vendor": "QuickJS",
              "versions": [
                {
                  "lessThan": "2025-09-13",
                  "status": "affected",
                  "version": "2025-04-26",
                  "versionType": "date"
                }
              ]
            }
          ],
          "credits": [
            {
              "lang": "en",
              "type": "finder",
              "value": "Google Big Sleep"
            }
          ],
          "datePublic": "2025-07-24T22:00:00.000Z",
          "descriptions": [
            {
              "lang": "en",
              "supportingMedia": [
                {
                  "base64": false,
                  "type": "text/html",
                  "value": "\u003cp\u003eA vulnerability exists in the QuickJS engine\u0027s BigInt string conversion logic (\u003ccode\u003ejs_bigint_to_string1\u003c/code\u003e) due to an incorrect calculation of the required number of digits, which in turn leads to reading memory past the allocated BigInt structure.\u003c/p\u003e\u003col\u003e\u003cli\u003e\u003cp\u003eThe function determines the number of characters (\u003ccode\u003en_digits\u003c/code\u003e) needed for the string representation by calculating:\u003c/p\u003e\u003cdiv\u003e$$ \\\\ \\text{n\\_digits} = (\\text{n\\_bits} + \\text{log2\\_radix} - 1) / \\text{log2\\_radix}$$\u003c/div\u003e\u003cp\u003e$$$$This formula is \u003cb\u003eoff-by-one\u003c/b\u003e in certain edge cases when calculating the necessary memory limbs. For instance, a 127-bit BigInt using radix 32 (where $\\text{log2\\_radix}=5$) is calculated to need $\\text{n\\_digits}=26$.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eThe maximum number of bits actually stored is $\\text{n\\_bits}=127$, which requires only two 64-bit limbs ($\\text{JS\\_LIMB\\_BITS}=64$).\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eThe conversion loop iterates \u003cb\u003e$\\text{n\\_digits}=26$ times\u003c/b\u003e, attempting to read 5 bits in each iteration, totaling $26 \\times 5 = 130$ bits.\u003c/p\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eIn the final iterations of the loop, the code attempts to read data that spans two limbs:\u003c/p\u003e\u003cdiv\u003e\u003cdiv\u003eC\u003cdiv\u003e\u003c/div\u003e\u003c/div\u003e\u003cdiv\u003e\u003cdiv\u003e\u003cpre\u003e\u003ccode\u003ec = (r-\u0026gt;tab[pos] \u0026gt;\u0026gt; shift) | (r-\u0026gt;tab[pos + 1] \u0026lt;\u0026lt; (JS_LIMB_BITS - shift));\n\u003c/code\u003e\u003c/pre\u003e\u003c/div\u003e\u003c/div\u003e\u003c/div\u003e\u003c/li\u003e\u003cli\u003e\u003cp\u003eSince the BigInt was only allocated two limbs, the read operation for \u003ccode\u003er-\u0026gt;tab[pos + 1]\u003c/code\u003e becomes an \u003cb\u003eOut-of-Bounds Read\u003c/b\u003e when \u003ccode\u003epos\u003c/code\u003e points to the last valid limb (e.g., $pos=1$).\u003c/p\u003e\u003c/li\u003e\u003c/ol\u003e\u003cp\u003eThis vulnerability allows an attacker to cause the engine to read and process data from the memory immediately following the BigInt buffer. This can lead to \u003cb\u003eInformation Disclosure\u003c/b\u003e of sensitive data stored on the heap adjacent to the BigInt object.\u003c/p\u003e\u003cbr\u003e"
                }
              ],
              "value": "A vulnerability exists in the QuickJS engine\u0027s BigInt string conversion logic (js_bigint_to_string1) due to an incorrect calculation of the required number of digits, which in turn leads to reading memory past the allocated BigInt structure.\n\n  *  The function determines the number of characters (n_digits) needed for the string representation by calculating:\n\n$$ \\\\ \\text{n\\_digits} = (\\text{n\\_bits} + \\text{log2\\_radix} - 1) / \\text{log2\\_radix}$$\n\n$$$$This formula is off-by-one in certain edge cases when calculating the necessary memory limbs. For instance, a 127-bit BigInt using radix 32 (where $\\text{log2\\_radix}=5$) is calculated to need $\\text{n\\_digits}=26$.\n\n\n  *  The maximum number of bits actually stored is $\\text{n\\_bits}=127$, which requires only two 64-bit limbs ($\\text{JS\\_LIMB\\_BITS}=64$).\n\n\n  *  The conversion loop iterates $\\text{n\\_digits}=26$ times, attempting to read 5 bits in each iteration, totaling $26 \\times 5 = 130$ bits.\n\n\n  *  In the final iterations of the loop, the code attempts to read data that spans two limbs:\n\nC\n\n\n\nc = (r-\u003etab[pos] \u003e\u003e shift) | (r-\u003etab[pos + 1] \u003c\u003c (JS_LIMB_BITS - shift));\n\n\n\n\n\n\n\n\n\n  *  Since the BigInt was only allocated two limbs, the read operation for r-\u003etab[pos + 1] becomes an Out-of-Bounds Read when pos points to the last valid limb (e.g., $pos=1$).\n\n\nThis vulnerability allows an attacker to cause the engine to read and process data from the memory immediately following the BigInt buffer. This can lead to Information Disclosure of sensitive data stored on the heap adjacent to the BigInt object."
            }
          ],
          "impacts": [
            {
              "capecId": "CAPEC-175",
              "descriptions": [
                {
                  "lang": "en",
                  "value": "CAPEC-175 Code Inclusion"
                }
              ]
            }
          ],
          "metrics": [
            {
              "cvssV4_0": {
                "Automatable": "NOT_DEFINED",
                "Recovery": "NOT_DEFINED",
                "Safety": "NOT_DEFINED",
                "attackComplexity": "HIGH",
                "attackRequirements": "PRESENT",
                "attackVector": "ADJACENT",
                "baseScore": 5.9,
                "baseSeverity": "MEDIUM",
                "privilegesRequired": "LOW",
                "providerUrgency": "NOT_DEFINED",
                "subAvailabilityImpact": "LOW",
                "subConfidentialityImpact": "HIGH",
                "subIntegrityImpact": "LOW",
                "userInteraction": "PASSIVE",
                "valueDensity": "NOT_DEFINED",
                "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",
                "version": "4.0",
                "vulnAvailabilityImpact": "LOW",
                "vulnConfidentialityImpact": "HIGH",
                "vulnIntegrityImpact": "LOW",
                "vulnerabilityResponseEffort": "NOT_DEFINED"
              },
              "format": "CVSS",
              "scenarios": [
                {
                  "lang": "en",
                  "value": "GENERAL"
                }
              ]
            }
          ],
          "problemTypes": [
            {
              "descriptions": [
                {
                  "cweId": "CWE-125",
                  "description": "CWE-125 Out-of-bounds Read",
                  "lang": "en",
                  "type": "CWE"
                }
              ]
            }
          ],
          "providerMetadata": {
            "dateUpdated": "2025-10-16T15:51:42.952Z",
            "orgId": "14ed7db2-1595-443d-9d34-6215bf890778",
            "shortName": "Google"
          },
          "references": [
            {
              "url": "https://bellard.org/quickjs/Changelog"
            },
            {
              "url": "https://issuetracker.google.com/434193024"
            }
          ],
          "source": {
            "discovery": "UNKNOWN"
          },
          "title": "Heap out-of-bounds read in js_bigint_to_string1 in QuickJS",
          "x_generator": {
            "engine": "Vulnogram 0.2.0"
          }
        }
      },
      "cveMetadata": {
        "assignerOrgId": "14ed7db2-1595-443d-9d34-6215bf890778",
        "assignerShortName": "Google",
        "cveId": "CVE-2025-62493",
        "datePublished": "2025-10-16T15:51:42.952Z",
        "dateReserved": "2025-10-15T08:47:41.878Z",
        "dateUpdated": "2025-10-16T17:59:10.306Z",
        "state": "PUBLISHED"
      },
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.