Use-After-Free Vulnerability in QuickJS Engine Standard Library
CVE-2025-62491
What is CVE-2025-62491?
A Use-After-Free vulnerability has been identified within the QuickJS engine's standard library during the management of unhandled rejected promises. This flaw occurs when the js_std_promise_rejection_check
function iterates through the rejected_promise_list
to handle unreported promise rejections. When the rejection reason is an Error object with a custom property getter, this getter can execute JavaScript code, including a call to catch()
on the same rejection being processed. This leads to the internal removal and freeing of the promise entry from the rejection list, while the iteration continues using freed memory. This results in a potential exploit allowing attackers to execute arbitrary code or manipulate memory unexpectedly.
Affected Version(s)
QuickJS 2025-04-26 < 2025-09-13