CVE-2025-62494 Type confusion in string addition in QuickJS

High 7.1 Published Updated

Type confusion in QuickJS string addition allows attackers to trigger memory corruption and execute arbitrary code via crafted JavaScript.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-62494?

CVE-2025-62494 is a high-severity memory corruption vulnerability in QuickJS, published on 16 Oct 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

A type confusion vulnerability exists in the handling of the string addition (+) operation within the QuickJS engine.

* The code first checks if the left-hand operand is a string.

* It then attempts to convert the right-hand operand to a primitive value using JS_ToPrimitiveFree. This conversion can trigger a callback (e.g., toString or valueOf).

* During this callback, an attacker can modify the type of the left-hand operand in memory, changing it from a string to a different type (e.g., an object or an array).

* The code then proceeds to call JS_ConcatStringInPlace, which still treats the modified left-hand value as a string.

This mismatch between the assumed type (string) and the actual type allows an attacker to control the data structure being processed by the concatenation logic, resulting in a type confusion condition. This can lead to out-of-bounds memory access, potentially resulting in memory corruption and arbitrary code execution in the context of the QuickJS runtime.

Weakness: CWE-704

Which versions are affected by CVE-2025-62494?

It affects 1 product.

Products include Quickjs Project Quickjs.

How do I fix CVE-2025-62494?

No fix has been published for CVE-2025-62494 yet. Limit exposure of the affected software until one is available.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2025-62494 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-62494 exists.

Sources

Also known as DEBIAN-CVE-2025-62494, GHSA-7gcv-76g2-94qm, UBUNTU-CVE-2025-62494.

Is CVE-2025-62494 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free