CVE and update status of the FreeBSD ports tree4,526 unaddressed CVEs in 616 portsAll times are CET

CVE details

CVE-2025-62491

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.

Score
8.8 high
Published
2025-10-16
Links
NVD · cve.org

Affected ports (1)

PortPackageVersionStatusMaintainer
lang/quickjs-ngquickjs-ng0.17.0unaddressedosa@FreeBSD.org

Template for a VuXML entry

Range taken from the CVE record, check it before committing. make newentry in security/vuxml creates the vid.

  <vuln vid="FIXME (make newentry)">
    <topic>FIXME -- FIXME</topic>
    <affects>
      <package>
	<name>quickjs-ng</name>
	<range><lt>2025-09-13</lt></range>
      </package>
    </affects>
    <description>
      <body xmlns="http://www.w3.org/1999/xhtml">
	<p>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.</p>
      </body>
    </description>
    <references>
      <cvename>CVE-2025-62491</cvename>
      <url>https://nvd.nist.gov/vuln/detail/CVE-2025-62491</url>
    </references>
    <dates>
      <discovery>2025-10-16</discovery>
      <entry>2026-10-25</entry>
    </dates>
  </vuln>