CVE-2025-46687

Source
https://cve.org/CVERecord?id=CVE-2025-46687
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-46687.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-46687
Downstream
Published
2025-04-27T00:00:00Z
Modified
2026-08-12T15:13:51Z
Severity
  • 5.6 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:L CVSS Calculator
Summary
[none]
Details

quickjs-ng through 0.9.0 has a missing length check in JS_ReadString for a string, leading to a heap-based buffer overflow. QuickJS before 2025-04-26 is also affected.

Database specific
{
    "cna_assigner":  "mitre",
    "cwe_ids":  [
        "CWE-770"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/46xxx/CVE-2025-46687.json",
    "unresolved_ranges":  [
        {
            "extracted_events":  [
                {
                    "fixed":  "2025-04-26"
                }
            ],
            "source":  "AFFECTED_FIELD"
        },
        {
            "extracted_events":  [
                {
                    "fixed":  "2025-04-26"
                }
            ],
            "source":  "CPE_FIELD"
        },
        {
            "extracted_events":  [
                {
                    "fixed":  "2025-04-26"
                }
            ],
            "source":  "DESCRIPTION"
        }
    ]
}
References

Affected packages

Git / github.com/bellard/quickjs

Affected ranges

Type
GIT
Repo
https://github.com/bellard/quickjs
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "source":  "REFERENCES"
}
Type
GIT
Repo
https://github.com/quickjs-ng/quickjs
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Database specific
Show details
{
    "cpe":  "cpe:2.3:a:quickjs-ng:quickjs:*:*:*:*:*:*:*:*",
    "extracted_events":  [
        {
            "introduced":  "0"
        },
        {
            "last_affected":  "0.9.0"
        }
    ],
    "source":  [
        "CPE_RANGE",
        "REFERENCES"
    ]
}

Affected versions

v0.*
v0.1.0
v0.2.0
v0.3.0
v0.4.0
v0.4.1
v0.5.0
v0.6.0
v0.6.1
v0.7.0
v0.8.0
v0.9.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-46687.json"
vanir_signatures
[
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "142692094675163766248626593700788711688",
            "length":  811
        },
        "id":  "CVE-2025-46687-044409f0",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/bellard/quickjs/commit/1eb05e44fad89daafa8ee3eb74b8520b4a37ec9a",
        "target":  {
            "file":  "quickjs.c",
            "function":  "JS_ReadString"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "336496557054134187046122969882429829436",
            "length":  1132
        },
        "id":  "CVE-2025-46687-1a1ff5f3",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/bellard/quickjs/commit/1eb05e44fad89daafa8ee3eb74b8520b4a37ec9a",
        "target":  {
            "file":  "quickjs.c",
            "function":  "JS_ReadBigInt"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "270962480617078350710858187892553615935",
            "length":  930
        },
        "id":  "CVE-2025-46687-21a8c8c7",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/quickjs-ng/quickjs/commit/28fa43d3ddff2c1ba91b6e3a788b2d7ba82d1465",
        "target":  {
            "file":  "quickjs.c",
            "function":  "JS_ReadString"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "function_hash":  "257371793794463417891731969341144570958",
            "length":  1045
        },
        "id":  "CVE-2025-46687-422349d2",
        "signature_type":  "Function",
        "signature_version":  "v1",
        "source":  "https://github.com/quickjs-ng/quickjs/commit/28fa43d3ddff2c1ba91b6e3a788b2d7ba82d1465",
        "target":  {
            "file":  "quickjs.c",
            "function":  "JS_ReadBigInt"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "332843701671949011927925472935012798470",
                "2839624452217712103974220836174867049",
                "288151278143669609929298465611219788168",
                "188454192332916566193707748698446093391",
                "79438405961513643496536004750457880999",
                "325719805685408242905203207394663183541",
                "197282144242275764245491051908965424488",
                "320908443830838053491245422122902773636",
                "63727860886987091610230413880950274479"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2025-46687-5c4385fc",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/quickjs-ng/quickjs/commit/28fa43d3ddff2c1ba91b6e3a788b2d7ba82d1465",
        "target":  {
            "file":  "quickjs.c"
        }
    },
    {
        "deprecated":  false,
        "digest":  {
            "line_hashes":  [
                "332843701671949011927925472935012798470",
                "2839624452217712103974220836174867049",
                "288151278143669609929298465611219788168",
                "188454192332916566193707748698446093391",
                "79438405961513643496536004750457880999",
                "325719805685408242905203207394663183541",
                "197282144242275764245491051908965424488",
                "320908443830838053491245422122902773636",
                "63727860886987091610230413880950274479"
            ],
            "threshold":  0.9
        },
        "id":  "CVE-2025-46687-a60cba44",
        "signature_type":  "Line",
        "signature_version":  "v1",
        "source":  "https://github.com/bellard/quickjs/commit/1eb05e44fad89daafa8ee3eb74b8520b4a37ec9a",
        "target":  {
            "file":  "quickjs.c"
        }
    }
]
vanir_signatures_modified
"2026-08-12T15:13:51Z"