{"id":"CVE-2025-62494","published":"2025-10-16T15:51:50Z","modified":"2025-10-16T17:46:39Z","title":"Type confusion in string addition in QuickJS","vendor":"QuickJS","product":"QuickJS","tier":"tail","description":{"text":"A type confusion vulnerability exists in the handling of the string addition (+) operation within the QuickJS engine.\n\n  *  The code first checks if the left-hand operand is a string.\n\n\n  *  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).\n\n\n  *  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).\n\n\n  *  The code then proceeds to call JS_ConcatStringInPlace, which still treats the modified left-hand value as a string.\n\n\nThis 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.1,"severity":"HIGH","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00456,"percentile":0.31528,"provenance":"source"},"cwes":[{"id":"CWE-704","name":"Incorrect Type Conversion or Cast"}],"references":[{"url":"https://bellard.org/quickjs/Changelog","tags":[]},{"url":"https://issuetracker.google.com/434193023","tags":[]}],"priority":{"score":11.3,"factors":[{"name":"EPSS percentile","points":6.31},{"name":"CVSS severity","points":4.97}]},"vendorSlug":"quickjs","affectedVersions":[{"vendor":"QuickJS","product":"QuickJS","versions":[">= 2025-04-26, < 2025-09-13"]}],"capec":[{"id":"CAPEC-175","name":"Code Inclusion"}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-10-16T17:46:18.542287Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2025-34780","exploited":false,"provenance":"source"}}