{"id":"CVE-2025-62491","state":"PUBLISHED","title":"Use-after-free in js_std_promise_rejection_check in QuickJS","description":"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).\n\n  *  The function js_std_promise_rejection_check attempts to iterate over the rejected_promise_list to report unhandled rejections using a standard list loop.\n\n\n  *  The reason for a promise rejection is processed inside the loop, including calling js_std_dump_error1(ctx, rp->reason).\n\n\n  *  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.\n\n\n  *  The malicious custom getter can execute JavaScript code that calls catch() on the same rejected promise being processed.\n\n\n  *  Calling catch() internally triggers js_std_promise_rejection_tracker, which then removes and frees the current promise entry (JSRejectedPromiseEntry) from the rejected_promise_list.\n\n\n  *  Since the list iteration continues using the now-freed memory pointer (el), the subsequent loop access results in a Use-After-Free condition.","publishedAt":"2025-10-16T15:51:24.238Z","updatedAt":"2025-10-16T18:04:16.529Z","severity":{"score":8.8,"label":"High","version":"4.0","vector":"CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L","source":"Google"},"assigner":"Google","products":["QuickJS QuickJS"],"affected":[{"vendor":"QuickJS","product":"QuickJS","packageName":"js_std_promise_rejection_check","defaultStatus":"unaffected","versions":[{"version":"2025-04-26","status":"affected","lessThan":"2025-09-13","versionType":"date"}],"collectionURL":"https://bellard.org/quickjs/"}],"references":["https://bellard.org/quickjs/Changelog","https://issuetracker.google.com/434195203"],"weaknesses":["CWE-416"],"ingestedAt":"2026-10-29T20:09:48.677Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/62xxx/CVE-2025-62491.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2025-62491","state":"PUBLISHED","datePublished":"2025-10-16T15:51:24.238Z","dateUpdated":"2025-10-16T18:04:16.529Z","assignerShortName":"Google","assignerOrgId":"14ed7db2-1595-443d-9d34-6215bf890778","dateReserved":"2025-10-15T08:47:41.878Z"},"containers":{"cna":{"title":"Use-after-free in js_std_promise_rejection_check in QuickJS","descriptions":[{"lang":"en","value":"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).\n\n  *  The function js_std_promise_rejection_check attempts to iterate over the rejected_promise_list to report unhandled rejections using a standard list loop.\n\n\n  *  The reason for a promise rejection is processed inside the loop, including calling js_std_dump_error1(ctx, rp->reason).\n\n\n  *  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.\n\n\n  *  The malicious custom getter can execute JavaScript code that calls catch() on the same rejected promise being processed.\n\n\n  *  Calling catch() internally triggers js_std_promise_rejection_tracker, which then removes and frees the current promise entry (JSRejectedPromiseEntry) from the rejected_promise_list.\n\n\n  *  Since the list iteration continues using the now-freed memory pointer (el), the subsequent loop access results in a Use-After-Free condition."}],"affected":[{"vendor":"QuickJS","product":"QuickJS","packageName":"js_std_promise_rejection_check","defaultStatus":"unaffected","versions":[{"version":"2025-04-26","status":"affected","lessThan":"2025-09-13","versionType":"date"}],"collectionURL":"https://bellard.org/quickjs/"}],"references":[{"url":"https://bellard.org/quickjs/Changelog"},{"url":"https://issuetracker.google.com/434195203"}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"HIGH","attackRequirements":"PRESENT","attackVector":"ADJACENT","baseScore":8.8,"baseSeverity":"HIGH","privilegesRequired":"NONE","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"LOW","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","userInteraction":"PASSIVE","valueDensity":"NOT_DEFINED","vectorString":"CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L","version":"4.0","vulnAvailabilityImpact":"LOW","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-416","description":"CWE-416 Use After Free","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"Google","orgId":"14ed7db2-1595-443d-9d34-6215bf890778","dateUpdated":"2025-10-16T15:51:24.238Z"},"credits":[{"lang":"en","type":"finder","value":"Google Big Sleep"}],"datePublic":"2025-07-24T22:00:00.000Z","impacts":[{"capecId":"CAPEC-175","descriptions":[{"lang":"en","value":"CAPEC-175 Code Inclusion"}]}],"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-10-16T18:03:58.190903Z","id":"CVE-2025-62491","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-10-16T18:04:16.529Z"}}]}}}