---
id: CVE-2026-105220
title: >-
  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
summary: >-
  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 op…
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'
cwe:
  - CWE-79
vendor: klembot
product: twinejs
affected:
  - twinejs <= 2.12.0
published: '2026-10-04'
updated: '2026-10-06'
sourceUpdated: '2026-10-06T16:08:43.180'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-105220'
references:
  - url: 'https://github.com/klembot/twinejs'
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/klembot/twinejs/blob/2.12.0/src/electron/main-process/scratch-file.ts#L57-L63
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/klembot/twinejs/blob/2.12.0/src/util/import.ts#L134-L136
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/klembot/twinejs/commit/3a9af28cabe9684730beb8b578132cad9bb5bc60
    label: disclosure@vulncheck.com
  - url: >-
      https://github.com/klembot/twinejs/commit/8e8a2bef5b1e20c58b99d22a2a4d8d867fb421cb
    label: disclosure@vulncheck.com
  - url: 'https://github.com/klembot/twinejs/issues/1706'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/twine-2-desktop-through-2.12.0-arbitrary-code-execution-via-imported-story-files
    label: disclosure@vulncheck.com
  - url: 'https://github.com/klembot/twinejs/issues/1706'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-105220.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-105220'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-105220'
tags:
  - nvd
  - cve.org
  - exploit-available
  - csaf
  - vex
  - red-hat
epss: 0.00215
epssPercentile: 0.11813
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-10-05T15:04:38.321934Z'
ingestedAt: '2026-10-04T23:05:36.168Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **Red Hat VEX** · updated 2026-10-04 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-105220.json)
