Skip to main content

Twine 2 CVE-2026-105220

| EUVDEUVD-2026-92133 HIGH
Cross-site Scripting (XSS) (CWE-79)
2026-10-04 VulnCheck GHSA-qx8m-f384-xrj3
8.5
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious story file
  2. Delivery
    Victim imports file into Twine editor
  3. Exploit
    XSS executes via importStories()
  4. Execution
    Abuse openWithScratchFile IPC to drop .bat
  5. Impact
    Execute 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

twinejs 0 ≤2.12.0

Affected Packages

euvd twinejs no fix

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

Vendor (VulnCheck) PRIMARY 8.5 HIGH
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
vuln.today AI 7.8 HIGH

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

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 96% exploitable
Prevalence
Low
niche interactive-fiction authoring tool, hobbyist desktop user base
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

42
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +42
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

CVE-2018-1000006 HIGH POC
8.8 Jan 24

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

CVE-2025-68669 CRITICAL POC
9.6 Dec 23

Remote code execution in 5ire 0.15.2 and earlier arises because the desktop AI assistant renders Mermaid diagrams with s

CVE-2025-67744 CRITICAL POC
9.6 Dec 16

Cross-site scripting in DeepChat's Mermaid diagram renderer escalates to full remote code execution on affected desktop

CVE-2025-66481 CRITICAL POC
9.6 Dec 09

Remote code execution in DeepChat 0.5.1 and below is possible through a cross-site scripting flaw in Mermaid diagram ren

CVE-2026-93922 HIGH POC
8.6 Sep 18

Stored cross-site scripting in SiYuan through 3.8.4 lets an attacker who can set a notebook name containing an HTML payl

CVE-2017-12581 HIGH POC
8.1 Aug 06

GitHub Electron before 1.6.8 allows remote command execution because of a nodeIntegration bypass vulnerability. Rated hi

CVE-2018-15685 HIGH POC
8.1 Aug 23

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

CVE-2018-1000136 HIGH POC
8.1 Mar 23

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

CVE-2024-39698 HIGH POC
7.5 Jul 09

electron-updater allows for automatic updates for Electron apps. Rated high severity (CVSS 7.5), this vulnerability is r

CVE-2026-70604 HIGH POC
7.4 Aug 05

Cross-origin read bypass in Electron's custom protocol handler exposes sensitive application data to remote pages via fe

CVE-2026-70611 MEDIUM POC
6.9 Aug 05

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

CVE-2020-4077 CRITICAL
9.9 Jul 07

In Electron before versions 7.2.4, 8.2.4, and 9.0.0-beta21, there is a context isolation bypass. Rated critical severity

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy