Skip to main content

Grimmory CVE-2026-42451

MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-05-08 GitHub_M
6.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Recon
    Obtain low-privilege Grimmory account
  2. Delivery
    Craft EPUB with embedded JavaScript payload
  3. Exploit
    Upload malicious book to shared library
  4. Install
    Entice privileged user to open book in browser reader
  5. C2
    JavaScript executes in victim's session context
  6. Execute
    Exfiltrate session token to attacker server
  7. Impact
    Replay token for full account takeover

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

The attacker must hold a Grimmory user account with sufficient permissions to add or upload EPUB books to the library (CVSS PR:L confirms low-privilege access is sufficient - no administrative rights needed to upload). A second user - ideally one with administrative privileges - must then actively open the malicious book in the browser-based EPUB reader (CVSS UI:R). Exploitation is limited to Grimmory's self-hosted deployments; there is no cloud-hosted surface. The attack is not automatable (SSVC: Automatable: no), as the attacker cannot force the victim to open the book. Exploitation requires crafting a valid EPUB that embeds executable JavaScript and bypasses any server-side upload validation - rated AC:H in the provided vector. Non-default conditions do not restrict exposure: any Grimmory instance running versions prior to 2.3.1 with default configuration is vulnerable once the upload and open steps occur.

Impact

The NVD-assigned CVSS 3.1 vector (AV:L/AC:H/PR:L/UI:R/S:U, score 6.3) appears to understate network accessibility: Grimmory is a web application and the attack path is an HTTP file upload, making AV:N a more accurate representation than AV:L. The AC:H rating likely reflects the social-engineering prerequisite of inducing a privileged user to open the book. EPSS at 0.01% (1st percentile) and SSVC exploitation status of 'none' both confirm no observed exploitation. However, SSVC rates technical impact as 'total,' reflecting that successful exploitation can yield full administrative account takeover. The combination of a low-footprint niche product, no KEV listing, no public exploit, required user interaction, and low-privilege upload access keeps real-world risk low despite the theoretical severity. The primary risk scenario is insider threat or a compromised low-privilege account within a self-hosted deployment.

Exploit ScenarioDerived

An attacker with a low-privilege Grimmory account crafts a malicious EPUB file containing an embedded JavaScript payload that exfiltrates the opener's session cookie to an attacker-controlled server. After uploading the book to the shared library and enticing an administrator to open it through the browser reader, the script silently executes, sends the admin session token externally, and the attacker replays it to gain full administrative control of the Grimmory instance. No public proof-of-concept code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
No patch listed yet 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jul 24, 2026

Stored XSS in Grimmory's browser-based EPUB reader (versions prior to 2.3.1) allows a low-privileged attacker who can add books to the library to embed arbitrary JavaScript in a crafted EPUB file, which executes in any opening user's browser with full access to the Grimmory session context. If an administrator opens the malicious book, the attacker can steal the admin session token and achieve full account takeover. No public exploit has been identified (EPSS 0.01%, 1st percentile), and vendor-released patch v2.3.1 is available.

RemediationAI

Upgrade Grimmory to version 2.3.1, released 2026-04-22, which removes the allow-scripts permission from the Foliate EPUB reader and enforces a Content Security Policy for EPUB resources (commit 5448205). The release is available at https://github.com/grimmory-tools/grimmory/releases/tag/v2.3.1. If an immediate upgrade is not possible, the most effective compensating control is restricting book-upload permissions to fully trusted accounts only, reducing the pool of potential attackers; note this does not eliminate risk if any trusted account is compromised. Disabling the browser-based EPUB reader entirely and directing users to download books for offline reading is a more aggressive workaround that eliminates the attack surface at the cost of in-browser reading functionality.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Grimmory is a self-hosted digital library web application (CPE: cpe:2.3:a:grimmory-tools:grimmory) that renders EPUB content through a browser-based reader built on the Foliate viewer library. The root cause (CWE-79: Improper Neutralization of Input During Web Page Generation) is that the Foliate component was configured with the allow-scripts permission, permitting JavaScript embedded in EPUB content to execute in the host browser's document context. Because the reader runs within the Grimmory web application's origin, malicious scripts inherit the application's session cookies and local storage, enabling cross-session attacks. The fix in v2.3.1 removed the allow-scripts attribute from the Foliate reader and applied a Content Security Policy (CSP) scoped to EPUB resources, blocking inline script execution at the browser level.

Know when Grimmory 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 (GitHub_M) PRIMARY 6.3 MEDIUM
AV:L/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:L
vuln.today AI 8.7 HIGH

Attack is delivered via HTTP upload (AV:N); PR:L reflects required account; S:C because script executes in victim's browser origin context; no availability impact.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
High
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

DescriptionCVE.org

Grimmory is a self-hosted digital library. Prior to version 2.3.1, a stored cross-site scripting (XSS) vulnerability in Grimmory's browser-based EPUB reader allows an attacker to embed arbitrary JavaScript in a crafted EPUB file. When a victim opens the book, the script executes in their browser with full access to the Grimmory application's session context. This can enable session token theft and account takeover, including administrative access if an administrator opens the affected book. This issue has been patched in version 2.3.1.

Threat Intelligence Overview

EPSS Score
0.0%
Top 99% exploitable
Prevalence
Rare
niche self-hosted digital library, limited enterprise footprint
Data Quality
5 sources
Confidence: Medium
NVD CVE.org EPSS Vulnrichment GitHub

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
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.

Affected Products (CPE)CVE.org

cpe:2.3:a:grimmory-tools:grimmory:*:*:*:*:*:*:*:*

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