ZeroHour

CVE-2026-82642

niche

Sanitizer Bypass (XSS) in Readest E-Book Reader Enables Arbitrary Code Execution

CVSS 3.1
8.8 high
EPSS
<1%p32
Published
()
Modified
AI analysis

Readest, an open-source e-book reader built on the Tauri framework, shipped a weak DOMPurify sanitizer configuration for EPUB chapter HTML that forbade only script tags in versions prior to 0.11.16. An attacker who can get a crafted EPUB opened by a victim can smuggle an iframe element through sanitization and embed a complete HTML document containing script inside its srcdoc attribute, which DOMPurify treats as an opaque string and does not sanitize. When the browser renders the iframe, the embedded script executes inside a sandbox that grants same-origin and scripts, letting it reach parent.parent.__TAURI_INTERNALS__.invoke and call any Tauri IPC command the application permits, which escalates to arbitrary code execution on the reader's device. The payload can be made invisible as a zero-size or transparent iframe, so the victim sees only normal book text while the code runs. All Readest users running versions before 0.11.16 are affected; no public proof-of-concept, KEV listing, or confirmed in-the-wild exploitation is currently known.

What to do: Upgrade Readest to version 0.11.16 or later, which hardens the sanitizer by adding iframe, object, and embed to FORBID_TAGS and srcdoc to FORBID_ATTR. As an interim mitigation, only open EPUB files from trusted sources, since exploitation requires a crafted book document. Given the high severity and low current exploitation probability, patch promptly before public PoCs or malicious samples appear.

Affected
Readest (open-source project) Readest (Tauri-based e-book reader, apps/readest-app EPUB sanitizer)All versions prior to 0.11.16; fixed in 0.11.16
Estimated exposure
nichelikely on the order of thousands of users worldwide; exact install counts unknown — No public active-install or download counts were provided, so the estimate relies on deployment patterns: Readest is a young, niche open-source desktop/mobile e-book reader rather than an internet-exposed service, and exploitation…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

Readest is an open-source e-book reader built on Tauri. In versions prior to 0.11.16, EPUB chapter HTML is sanitized with DOMPurify using a configuration that forbade only the tag (FORBID_TAGS: ['script']) in apps/readest-app/src/services/transformers/sanitizer.ts. DOMPurify does not parse the contents of the srcdoc attribute on elements, treating it as an opaque string attribute, so an attacker who can get an element to survive sanitization can embed a complete HTML document containing a tag inside srcdoc and have it execute when the browser renders the iframe. The content iframe is configured with sandbox="allow-same-origin allow-scripts", so script executing inside it shares the parent origin and can reach parent.parent.__TAURI_INTERNALS__.invoke(...), giving access to every Tauri IPC command the application is permitted to use, which escalates to arbitrary code execution. The payload can be made invisible (zero-size, transparent iframe) so the reader sees only normal book text. Version 0.11.16 hardened the sanitizer configuration by adding 'iframe', 'object' and 'embed' to FORBID_TAGS and adding 'srcdoc' to FORBID_ATTR.

Weakness
CWE-79
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

In the news

No ingested article mentions this CVE yet.