Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious story file
-
DeliveryVictim imports file into Twine editor
-
ExploitXSS executes via importStories()
-
ExecutionAbuse openWithScratchFile IPC to drop .bat
-
ImpactExecute arbitrary code as user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires the victim to import an attacker-crafted Twine story file into the Twine 2 desktop (Electron) application, version 2.12.0 or earlier; the importStories() function executes untrusted markup from the imported file in the editor window, and the payload must invoke the Electron twineElectron openWithScratchFile IPC bridge to write and open a .bat file. Exploitation is limited by the need for user interaction (the victim must actively import the malicious file) and is specific to the Electron desktop build, since the openWithScratchFile IPC bridge is not present in a plain browser context. No authentication or special configuration is required (PR:N), but delivery depends on social engineering to get the target to import the file. |
| Impact | The CVSS 4.0 base score of 8.5 (High) reflects a serious outcome - full code execution (VC:H/VI:H/VA:H) as the logged-in user - but the signals temper the real-world urgency. The vector is Local (AV:L) and requires passive user interaction (UI:P): the victim must obtain and import a crafted story file, so this is not remotely or automatically exploitable despite PR:N. No EPSS score, no CISA KEV listing, and no POC indicator were provided, so there is no public exploit identified at time of analysis and no evidence of active or widespread exploitation. This is best characterized as a genuine arbitrary-code-execution bug that is high-impact but gated behind social engineering and a niche application, rather than a mass-exploitable emergency. No SSVC decision data (exploitation status, automatable, technical impact) was supplied, so an SSVC-based prioritization cannot be derived from the input. The confidentiality/integrity/availability impacts are confirmed by the description (write-and-execute a .bat as the user); the limiting factor is the delivery requirement, which should drive prioritization below network-reachable unauthenticated RCEs. |
| Exploit ScenarioDerived | An attacker distributes a seemingly benign Twine story file through a forum, shared project, or direct message. When a victim imports it into Twine 2 desktop (≤2.12.0), markup embedded in the file is executed by importStories() in the editor window and calls the twineElectron openWithScratchFile IPC bridge to write and launch a .bat file, running arbitrary commands with the victim's privileges. No public exploit code was identified at time of analysis, though VulnCheck's advisory documents the technique and the local, user-interaction-dependent vector means the attacker relies on convincing the target to import the file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 04, 2026
Code execution as the logged-in user results when someone running the Twine 2 desktop (Electron) application on version 2.12.0 or earlier imports a crafted story file. The importStories() routine renders untrusted markup from the imported file inside the editor window, and a script smuggled in that markup can reach the twineElectron openWithScratchFile IPC bridge to write and then open a .bat file, yielding arbitrary code execution in the user's context. No public exploit code has been identified at time of analysis, and although no authentication is required (CVSS vector PR:N), exploitation depends on the victim actively importing the attacker's file, so delivery is a social-engineering problem; the CVSS 4.0 base score is 8.5 (High) with high confidentiality, integrity, and availability impact on the local host only.
RemediationAI
Upstream fix available (PR/commit); released patched version not independently confirmed - vendors report a patch, and the fixes are in commits https://github.com/klembot/twinejs/commit/8e8a2bef5b1e20c58b99d22a2a4d8d867fb421cb and https://github.com/klembot/twinejs/commit/3a9af28cabe9684730beb8b578132cad9bb5bc60, so track https://github.com/klembot/twinejs and the advisory at https://www.vulncheck.com/advisories/twine-2-desktop-through-2.12.0-arbitrary-code-execution-via-imported-story-files for a tagged desktop release newer than 2.12.0 and upgrade as soon as one ships. Until then, the most effective compensating control is to treat every .tws/story archive as untrusted: do not import story files received from outside a trusted, controlled source, and restrict imports to content you produced yourself, accepting the workflow friction that legitimate collaboration via shared story files is effectively blocked. Where a browser-hosted instance of Twine is acceptable, use it instead of the Electron desktop build, since the twineElectron openWithScratchFile IPC bridge is only present in Electron and the code-execution chain therefore does not apply - the trade-off is loss of native filesystem integration and desktop features. Additionally, run the Twine desktop app under a low-privilege OS account with no access to sensitive directories, mark downloadable script and batch file types for quarantine in the OS or mail gateway, and remove .bat associations from the shell where practical; these reduce the blast radius of a successful chain but do not close the underlying injection, and none should be treated as a substitute for the upstream fix.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Twine 2 (published as TwineJS, CPE cpe:2.3:a:klembot:twinejs) is a story-authoring tool whose desktop distribution is an Electron shell around the same web application codebase. The root cause is CWE-79, improper neutralization of input during web page generation: importStories() in src/util/import.ts (referenced lines 134-136) parses an imported story archive and injects portions of its content into the editor view without adequate sanitization, so attacker-controlled markup becomes live HTML/script in the renderer. In the browser-hosted build this would be a conventional cross-site scripting issue, but the Electron build exposes additional main-process capabilities to the renderer, notably the twineElectron openWithScratchFile IPC bridge in src/electron/main-process/scratch-file.ts (lines 57-63), which writes supplied content to a scratch file and opens it with the operating system. Chaining the renderer-side injection to that privileged bridge lets the injected script materialize a .bat file and hand it to the shell for execution, turning a client-side XSS class into local code execution. The attack surface is confined to the desktop/Electron build, since the openWithScratchFile bridge does not exist in a plain browser context.
Know when Electron gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Exploitation needs the victim to import a malicious local story file (AV:L, UI:R) with no prior privileges (PR:N); IPC abuse yields full code execution as the user (C/I/A:H).
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
Twine 2 desktop through 2.12.0 contains a cross-site scripting vulnerability in importStories() that executes markup from imported story files in the editor window. Attackers can craft a story file whose script calls the twineElectron openWithScratchFile IPC bridge to write and open a .bat file, executing code as the user.
Executive ViewAI
Twine 2 desktop (Electron) versions 2.12.0 and earlier can allow arbitrary code execution in the logged-in user's context when a user imports a crafted story file, exposing affected endpoints and any data or privileges available to that user. There is no public exploit identified at time of analysis, and while the CVSS vector indicates no authentication is required (PR:N), exploitation requires the victim to import the attacker's file, making this primarily a social-engineering and endpoint-hygiene risk. Leadership should care because unpatched users remain one convincing file away from a local compromise that can affect confidentiality, integrity, and availability on their systems.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
GitHub Electron versions 1.8.2-beta.3 and earlier, 1.7.10 and earlier, 1.6.15 and earlier has a vulnerability in the pro
Remote code execution in 5ire 0.15.2 and earlier arises because the desktop AI assistant renders Mermaid diagrams with s
Cross-site scripting in DeepChat's Mermaid diagram renderer escalates to full remote code execution on affected desktop
Remote code execution in DeepChat 0.5.1 and below is possible through a cross-site scripting flaw in Mermaid diagram ren
Stored cross-site scripting in SiYuan through 3.8.4 lets an attacker who can set a notebook name containing an HTML payl
GitHub Electron before 1.6.8 allows remote command execution because of a nodeIntegration bypass vulnerability. Rated hi
GitHub Electron 1.7.15, 1.8.7, 2.0.7, and 3.0.0-beta.6, in certain scenarios involving IFRAME elements and "nativeWindow
Electron version 1.7 up to 1.7.12; 1.8 up to 1.8.3 and 2.0.0 up to 2.0.0-beta.3 contains an improper handling of values
electron-updater allows for automatic updates for Electron apps. Rated high severity (CVSS 7.5), this vulnerability is r
Cross-origin read bypass in Electron's custom protocol handler exposes sensitive application data to remote pages via fe
Native code execution outside the Chromium sandbox is achievable in Electron prior to 39.8.9, 40.9.2, 41.2.1, and 42.0.0
In Electron before versions 7.2.4, 8.2.4, and 9.0.0-beta21, there is a context isolation bypass. Rated critical severity
EUVD-2026-92133
GHSA-qx8m-f384-xrj3
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB