The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-25731

CVE-2026-25731: Calibre E-Book Manager RCE Vulnerability

CVE-2026-25731 is a Server-Side Template Injection flaw in Calibre e-book manager that enables remote code execution via malicious templates. This article covers technical details, affected versions, and mitigation.

Published: February 13, 2026

CVE-2026-25731 Overview

CVE-2026-25731 is a Server-Side Template Injection (SSTI) vulnerability discovered in Calibre, a widely-used open-source e-book management application. Prior to version 9.2.0, the vulnerability exists in Calibre's Templite templating engine, allowing arbitrary code execution when a user converts an ebook using a malicious custom template file via the --template-html or --template-html-index command-line options.

Critical Impact

This vulnerability enables attackers to execute arbitrary code on victim systems by crafting malicious template files, potentially leading to complete system compromise when users process untrusted ebook conversion templates.

Affected Products

  • Calibre e-book manager versions prior to 9.2.0
  • Systems using Calibre's Templite templating engine for HTML conversion
  • Users utilizing custom template files with --template-html or --template-html-index options

Discovery Timeline

  • 2026-02-06 - CVE-2026-25731 published to NVD
  • 2026-02-06 - Last updated in NVD database

Technical Details for CVE-2026-25731

Vulnerability Analysis

This Server-Side Template Injection vulnerability affects the Templite templating engine used by Calibre for HTML templating during ebook conversions. The vulnerability arises because the Templite engine processes user-controlled template content without adequate sandboxing or input validation, allowing malicious template expressions to execute arbitrary Python code in the context of the Calibre application.

The attack requires local access and user interaction—specifically, a user must be tricked into using a malicious template file when converting ebooks. Despite these requirements, successful exploitation can result in complete compromise of confidentiality, integrity, and availability on the affected system.

Root Cause

The root cause is the use of the Templite templating engine, which lacked sufficient security controls to prevent code execution through template expressions. Templite allows embedded Python code execution within templates, which becomes dangerous when processing untrusted template files provided by users or sourced from external locations.

The vulnerability is classified under CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), indicating that template expressions were not properly sanitized before processing.

Attack Vector

The attack vector requires local access with no privileges but requires user interaction. An attacker would craft a malicious template file containing embedded code and convince a victim to use this template when converting an ebook. The attack could be delivered through:

  1. Distributing malicious template files disguised as legitimate ebook conversion templates
  2. Embedding malicious templates within ebook packages shared on forums or file-sharing platforms
  3. Social engineering users to download and use "enhanced" template files

The security patch addressed this vulnerability by replacing the Templite templating engine with Pystache, a logic-less templating library that does not support arbitrary code execution:

text
 	"xxhash == 3.6.0",
     "tzdata == 2025.2",
     "tzlocal == 5.3.1",
+	"pystache == 0.6.8",
 ]
 
 [project.urls]

Source: GitHub Commit

The patch also removed the Templite dependency entirely:

text
 Copyright: Various
 License: BSD
 
-Files: src/templite/*
-Copyright: Copyright (c) 2009 joonis new media, Thimo Kraemer
-License: GPL-2+
- The full text of the GPL is distributed as in
- /usr/share/common-licenses/GPL-2 on Debian systems.
-
 Files: src/calibre/devices/bambook/*
 Copyright: 2010, Li Fanxi
 License: GPL-3

Source: GitHub Commit

Detection Methods for CVE-2026-25731

Indicators of Compromise

  • Unexpected process spawning from Calibre application during ebook conversion operations
  • Unusual network connections originating from the Calibre process
  • Suspicious template files (.html, .xhtml) containing embedded Python code or template injection payloads
  • Command-line invocations of Calibre using --template-html or --template-html-index with non-standard template sources

Detection Strategies

  • Monitor process creation events for child processes spawned by Calibre during conversion operations
  • Implement file integrity monitoring on template directories used by Calibre
  • Analyze command-line arguments for Calibre executions, particularly those referencing external template files
  • Deploy endpoint detection rules to identify template injection patterns in files processed by Calibre

Monitoring Recommendations

  • Enable audit logging for Calibre application execution and file access patterns
  • Implement application control policies to restrict Calibre from executing system commands
  • Monitor for anomalous Python code execution patterns within the Calibre process context
  • Track downloads and file modifications in directories commonly used for ebook templates

How to Mitigate CVE-2026-25731

Immediate Actions Required

  • Upgrade Calibre to version 9.2.0 or later immediately
  • Audit existing template files used in ebook conversion workflows for suspicious content
  • Avoid using custom templates from untrusted sources until the patch is applied
  • Review recent ebook conversion activities for any anomalous behavior

Patch Information

The vulnerability has been fixed in Calibre version 9.2.0. The fix replaces the vulnerable Templite templating engine with Pystache, a logic-less templating library that prevents arbitrary code execution. The security patch is available via:

  • GitHub Security Advisory
  • GitHub Commit f0649b27512e987b95fcab2e1e0a3bcdafc23379

Workarounds

  • Disable or restrict use of custom HTML templates until upgrade is complete
  • Implement strict file validation for any template files before use
  • Run Calibre in a sandboxed environment or container to limit potential impact of exploitation
  • Apply application whitelisting to prevent Calibre from executing unauthorized code
bash
# Verify Calibre version to ensure patch is applied
calibre --version
# Expected output should show version 9.2.0 or higher

# If using package manager (example for Debian/Ubuntu)
sudo apt update && sudo apt install --only-upgrade calibre

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCalibre

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityHigh
  • AvailabilityHigh
  • CWE References
  • CWE-1336
  • Technical References
  • GitHub Commit Update

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-25635: Calibre E-Book Manager RCE Vulnerability

  • CVE-2024-6782: Calibre RCE Vulnerability

  • CVE-2026-33205: Calibre E-Book Manager SSRF Vulnerability

  • CVE-2026-33206: Calibre E-book Path Traversal Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English