CVE-2026-30853
NixOS vulnerability analysis and mitigation

Overview

CVE-2026-30853 is a path traversal vulnerability in calibre's RocketBook (.rb) input plugin (src/calibre/ebooks/rb/reader.py) that allows an attacker to write arbitrary files to any path writable by the calibre process when a user opens or converts a crafted .rb file. It affects all calibre versions prior to 9.5.0 (≤ 9.4.0) across Linux and Windows platforms. The vulnerability was published on March 13, 2026, and patched in calibre 9.5.0. It carries a CVSS v3.1 base score of 8.2 (High) per Feedly threat intelligence data, though the GitHub advisory rates it 5.0 (Moderate) using a more conservative vector (GitHub Advisory, Red Hat Bugzilla).

Technical details

The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory — Path Traversal). In rb/reader.py, the get_toc() function reads a 32-byte TOC entry name from attacker-controlled binary data and URL-decodes it without any path sanitization. Both get_text() and get_image() then pass this unsanitized name directly to os.path.join(output_dir, name) and open the result for writing — when the name is an absolute path (e.g., /home/user/evil.png), Python's os.path.join discards output_dir entirely, and relative traversal sequences like ../../evil.html also work. The patched PDB readers (reader132.py, reader202.py) use an image_dest() helper with a commonprefix boundary check, but this fix was never applied to the RB reader (the same bug class as CVE-2026-26065). The .png code path writes fully attacker-controlled raw bytes, while the .html path applies cp1252→UTF-8 re-encoding (GitHub Advisory).

Impact

Successful exploitation allows an attacker to write arbitrary files — with fully controlled content via the .png path — to any filesystem location writable by the calibre process, including the user's home directory and Desktop. This can result in overwriting existing files (data destruction), planting malicious payloads in startup directories or shell configuration files, and potentially achieving code execution. Confidentiality is not directly impacted, but integrity and availability are both rated High in the Feedly CVSS assessment, reflecting the risk of system compromise (GitHub Advisory, Red Hat Bugzilla).

Exploitability

A complete, runnable proof-of-concept Python script (make_poc_rb.py) is publicly available in the GitHub security advisory, which generates a malicious .rb file and demonstrates arbitrary file write via ebook-convert malicious.rb output.epub. No privileges are required; exploitation only requires user interaction (opening or converting the crafted file). There is no evidence of in-the-wild exploitation at this time, and no threat actor attribution has been reported. The EPSS score is 0.000110 (very low probability of exploitation in the near term), and the vulnerability is not listed in the CISA KEV catalog (GitHub Advisory).

Exploitation steps

  1. Craft the malicious .rb file: Run the public PoC generator make_poc_rb.py to produce a valid RocketBook file with a TOC entry whose 32-byte name field contains an absolute path (e.g., /tmp/CALIBRE_RB_POC.png) or a relative traversal sequence (e.g., ..\..\..\..\..\Desktop\x.png on Windows). The content block is set to the attacker's desired payload bytes (e.g., a shell script).
  2. Deliver the file to the target: Social-engineer the victim into receiving the crafted .rb file via email, file sharing, or by placing it in a directory the user is likely to open (e.g., a shared e-book library folder).
  3. Trigger conversion or opening: The victim opens the file in calibre or runs ebook-convert malicious.rb output.epub. The conversion will error with "Spine is empty" — this is expected and does not prevent the file write.
  4. Arbitrary file write occurs: During processing, get_toc() reads the unsanitized TOC name, and get_image() calls open(os.path.join(output_dir, name), 'wb'). Because name is an absolute path, os.path.join discards output_dir and writes the payload directly to the attacker-specified location.
  5. Achieve code execution (optional): If the payload is written to a location that is executed automatically (e.g., ~/.bashrc, a startup script, or a Windows Startup folder), the attacker achieves code execution upon the next user login or shell invocation. Verify with ls -la /tmp/CALIBRE_RB_POC.png or xxd /tmp/CALIBRE_RB_POC.png (GitHub Advisory).

Indicators of compromise

  • File System: Unexpected files appearing in user home directories, Desktop, /tmp/, or shell configuration files (e.g., ~/.bashrc, ~/.profile) with unusual content or timestamps coinciding with calibre usage; files with image extensions (.png) that are identified by file as shell scripts or other non-image types.
  • Process: The calibre process (calibre, ebook-convert) spawning child processes or writing files outside its expected output directory; ebook-convert invocations on .rb files from untrusted sources.
  • Logs: Calibre conversion logs showing "Spine is empty" errors immediately after processing a .rb file, which is a known side effect of exploitation; filesystem audit logs (e.g., auditd on Linux) recording unexpected file creation events by the calibre process outside its working directory.
  • Network: Unusual outbound connections from the calibre process after conversion, which may indicate a dropped payload was executed (GitHub Advisory).

Mitigation and workarounds

Upgrade calibre to version 9.5.0 or later, which applies the same image_dest() boundary check fix previously used for the PDB readers to the RB reader. Until patching is possible, avoid opening or converting .rb files from untrusted or unknown sources. Additionally, consider restricting filesystem permissions for the calibre process to limit the impact of any potential file writes (GitHub Advisory, Red Hat Bugzilla).

Community reactions

The vulnerability was reported by researcher andrejtomci and disclosed via GitHub's security advisory program. Red Hat tracked it via their Bugzilla system and assigned it medium severity. The HowToGeek publication noted the calibre 9.5.0 release as a security improvement. No significant broader media coverage or notable social media discussion has been identified beyond standard vulnerability database entries.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

calibre: 6.13.0+repack-2+deb12u8

Fixed

sid

calibre: 9.5.0+ds+~0.10.5-1

Fixed

trixie

calibre: 8.5.0+ds-1+deb13u3

Fixed

Ubuntu

Unknown

bionic (esm-apps)

calibre

Unknown

devel

calibre

Unknown

focal (esm-apps)

calibre

Unknown

jammy

calibre

Unknown

jammy (esm-apps)

calibre

Unknown

noble

calibre

Unknown

noble (esm-apps)

calibre

Unknown

resolute

calibre

Unknown

SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-86738CRITICAL9.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86734HIGH7.1
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86735MEDIUM5.9
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86737MEDIUM5.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026
CVE-2026-86736MEDIUM5.3
  • NixOS logoNixOS
  • snipe-it
NoYesSep 08, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management