CVE-2025-62490: Use-after-free in js_print_object in QuickJS
In quickjs, in jsprintobject, when printing an array, the function first fetches the array length and then loops over it. The issue is, printing a value is not side-effect free. An attacker-defined callback could run during jsprintvalue, during which the array could get resized and len1 become out of bounds. This results in a use-after-free.A second instance occurs in the same function during printing of a map or set objects. The code iterates over ms->records list, but once again, elements could be removed from the list during jsprintvalue call.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2025-62490?
CVE-2025-62490 has been classified as a medium severity vulnerability due to potential exploitation involving arbitrary code execution.
How do I fix CVE-2025-62490?
To fix CVE-2025-62490, update QuickJS to the latest version that addresses this issue as per official patches.
What systems are affected by CVE-2025-62490?
CVE-2025-62490 affects QuickJS versions where the js_print_object function inappropriately handles array resizing during printing.
Can CVE-2025-62490 allow remote code execution?
Yes, CVE-2025-62490 can potentially allow remote code execution if exploited through manipulated array printing.
What is the nature of the vulnerability in CVE-2025-62490?
The nature of CVE-2025-62490 involves side effects during the execution of attacker-defined callbacks while printing array values.