CVE-2026-105220

Twine 2 Desktop through 2.12.0 Arbitrary Code Execution via Imported Story Files

Published Oct 4, 2026 CVSS 4.0 · 8.5 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Twine 2 Desktop versions up to 2.12.0 contain a cross‑site scripting flaw in the importStories function that allows a crafted story file to inject markup into the editor. The injected script can call the twineElectron openWithScratchFile IPC bridge to write and open a .bat file, causing the operating system to execute the script with the current user’s privileges. This results in arbitrary code execution as the user, exposing the system to full compromise.

Affected Systems

The affected product is Twine 2 Desktop, distributed by klembot (twinejs). Versions 2.12.0 and earlier are vulnerable; any installation of Twine 2 Desktop that has not been upgraded past 2.12.0 is at risk.

Risk and Exploitability

The CVSS score of 8.5 marks this flaw as high severity. Exploitation requires an attacker to supply a malicious story file to a user who opens it; therefore, the attack vector is local and depends on user action. EPSS data is not available, so the overall exploitation probability is unknown, but the lack of a KEV listing suggests an unreported or low‑profile risk at the time of analysis.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Twine to a version newer than 2.12.0, which removes the vulnerable importStories behaviour.
  • Avoid opening story files from untrusted or unknown sources, and inspect or sanitize files before import.
  • If possible, disable or remove the twineElectron openWithScratchFile IPC bridge so that imported scripts cannot write executable files.

Generated by OpenCVE AI on October 4, 2026 at 23:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Klembot
Klembot twinejs
Vendors & Products Klembot
Klembot twinejs
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Twine 2 Desktop through 2.12.0 Arbitrary Code Execution via Imported Story Files
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, 'vector': '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'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 5, 2026, 3:06 PM
Reserved
Oct 4, 2026, 1:04 PM
Status
Deferred
Published
Oct 4, 2026, 11:16 PM
Modified
Oct 6, 2026, 4:08 PM