Junglewise Threat Intelligence

CVE-2026-37630: QuickJS-NG arbitrary code execution in js_mapped_arguments_mark

CVE-2026-37630 · Severity: high · CVSS 7.3 · Published 2026-05-11

Executive brief

QuickJS-NG is a small, embeddable JavaScript engine used by developers to add scripting capabilities to their applications. A security flaw in how the engine manages memory during garbage collection could allow a malicious script to crash the application or execute unauthorized code. This could lead to a complete compromise of the application's security and the data it processes.

Technical details

A vulnerability exists in QuickJS-NG v0.12.1 within the `js_mapped_arguments_mark` function. The root cause is that the function fails to distinguish between detached and non-detached `JSVarRef` entries when marking children for garbage collection. Non-detached references are not tracked in the GC list and contain uninitialized `link.prev` and `link.next` pointers. When `gc_decref_child` calls `list_del` on these entries, it dereferences these uninitialized pointers. An attacker can use heap grooming techniques to control the memory reused by these references, turning the uninitialized pointers into a 'write-what-where' primitive to achieve arbitrary code execution. This requires the ability to execute malicious JavaScript within the engine.

Affected products

  • QuickJS-NG QuickJS-NG 0.12.1

Timeline

  • 2026-05-11: disclosed: Issue reported on GitHub repository
  • 2026-05-11: advisory: CVE published by MITRE/NVD

References