quickjs — security advisory
A Use-After-Free (UAF) vulnerability exists in the QuickJS engine's standard library when iterating over the global list of unhandled rejected promises (ts->rejected_promise_list). * The function js_std_promise_rejection_check attempts to iterate over the rejected_promise_list to report unhandled rejections using a standard list loop. * The reason for a promise rejection is processed inside the loop, including calling js_std_dump_error1(ctx, rp->reason). * If the promise rejection reason is an Error object that defines a custom property getter (e.g., via Object.defineProperty), this getter is executed during the error dumping process. * The malicious custom getter can execute JavaScript code that calls catch() on the same rejected promise being processed. * Calling catch() internally triggers js_std_promise_rejection_tracker, which then removes and frees the current promise entry (JSRejectedPromiseEntry) from the rejected_promise_list. * Since the list iteration continues using the now-freed memory pointer (el), the subsequent loop access results in a Use-After-Free condition.
- Products
- quickjs
- Affected versions
- 2025.04.26-1
- Fixed versions
- Not specified
- CVEs
- CVE-2025-62491
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 22:57 UTC · Revision 1
Source evidence
A Use-After-Free (UAF) vulnerability exists in the QuickJS engine's standard library when iterating over the global list of unhandled rejected promises (ts->rejected_promise_list). * The function js_std_promise_rejection_check attempts to iterate over the rejected_promise_list to report unhandled rejections using a standard list loop. * The reason for a promise rejection is processed inside the loop, including calling js_std_dump_error1(ctx, rp->reason). * If the promise rejection reason is an Error object that defines a custom property getter (e.g., via Object.defineProperty), this getter is executed during the error dumping process. * The malicious custom getter can execute JavaScript code that calls catch() on the same rejected promise being processed. * Calling catch() internally triggers js_std_promise_rejection_tracker, which then removes and frees the current promise entry (JSRejectedPromiseEntry) from the rejected_promise_list. * Since the list iteration continues using the now-freed memory pointer (el), the subsequent loop access results in a Use-After-Free condition.
osv:DEBIAN-CVE-2025-62491
quickjs
Fixed versions: Not specified
quickjs
Fixed versions: Not specified
Complete source record
{
"id": "63f080e5a232c1e8776d3fb25e19635889b3377e26b6d0b67198c2ffb96161e2",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2025-62491",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2025-62491",
"summary": "A Use-After-Free (UAF) vulnerability exists in the QuickJS engine's standard library when iterating over the global list of unhandled rejected promises (ts->rejected_promise_list). * The function js_std_promise_rejection_check attempts to iterate over the rejected_promise_list to report unhandled rejections using a standard list loop. * The reason for a promise rejection is processed inside the loop, including calling js_std_dump_error1(ctx, rp->reason). * If the promise rejection reason is an Error object that defines a custom property getter (e.g., via Object.defineProperty), this getter is executed during the error dumping process. * The malicious custom getter can execute JavaScript code that calls catch() on the same rejected promise being processed. * Calling catch() internally triggers js_std_promise_rejection_tracker, which then removes and frees the current promise entry (JSRejectedPromiseEntry) from the rejected_promise_list. * Since the list iteration continues using the now-freed memory pointer (el), the subsequent loop access results in a Use-After-Free condition.",
"evidence": "osv:DEBIAN-CVE-2025-62491",
"products": [
{
"name": {
"value": "quickjs",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2025.04.26-1",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "quickjs",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2025.04.26-1",
"evidence": "/affected/1/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2025-62491",
"aliases": [
"DEBIAN-CVE-2025-62491"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "quickjs",
"purl": "pkg:deb/debian/quickjs?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"2025.04.26-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-62491.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "quickjs",
"purl": "pkg:deb/debian/quickjs?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"2025.04.26-1"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2025-62491.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-23T17:47:30.643420674Z",
"provider": "osv",
"upstream": [
"CVE-2025-62491"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2025-62491"
]
},
"related_cves": [
{
"value": "CVE-2025-62491",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 417333,
"published_at": "2025-10-16T16:15:39.47+00:00"
}