UBUNTU-CVE-2025-62493

Source
https://ubuntu.com/security/CVE-2025-62493
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-62493.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2025-62493
Upstream
Published
2025-10-16T16:15:00Z
Modified
2026-05-20T16:23:39Z
Severity
  • 5.9 (Medium) CVSS_V4 - 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 CVSS Calculator
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
  • Ubuntu - medium
Summary
[none]
Details

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.

References

Affected packages

Ubuntu:Pro:24.04:LTS / quickjs

Package

Name
quickjs
Purl
pkg:deb/ubuntu/quickjs?arch=source&distro=esm-apps%2Fnoble

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2021.*
2021.03.27-1
2021.03.27-1ubuntu0.1~esm1

Ecosystem specific

{
    "binaries":  [
        {
            "binary_name":  "libquickjs",
            "binary_version":  "2021.03.27-1ubuntu0.1~esm1"
        },
        {
            "binary_name":  "quickjs",
            "binary_version":  "2021.03.27-1ubuntu0.1~esm1"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-62493.json"

Ubuntu:25.10 / quickjs

Package

Name
quickjs
Purl
pkg:deb/ubuntu/quickjs?arch=source&distro=questing

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2024.*
2024.01.13-5
2025.*
2025.04.26-1

Ecosystem specific

{
    "binaries":  [
        {
            "binary_name":  "libquickjs",
            "binary_version":  "2025.04.26-1"
        },
        {
            "binary_name":  "quickjs",
            "binary_version":  "2025.04.26-1"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-62493.json"

Ubuntu:26.04:LTS / quickjs

Package

Name
quickjs
Purl
pkg:deb/ubuntu/quickjs?arch=source&distro=resolute

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

2025.*
2025.04.26-1
2025.04.26-1build1

Ecosystem specific

{
    "binaries":  [
        {
            "binary_name":  "libquickjs",
            "binary_version":  "2025.04.26-1build1"
        },
        {
            "binary_name":  "quickjs",
            "binary_version":  "2025.04.26-1build1"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-62493.json"