Skip to content
Path traversal Write-up Intermediate

Exploiting CVE-2023–44451 and CVE-2023–52076 (Slippy-Book): A

A path traversal flaw in the EPUB handling of Atril and Xreader allows a crafted EPUB file to write new files to arbitrary locations, such as the autostart directory. An attacker could use this to place a .desktop file that runs a reverse shell when the user next logs in, achieving remote code execution.

SAJ0x00IN Follow

Published on medium.com

In this blog post, we’ll explore CVE-2023–44451 and CVE-2023–52076, collectively known as Slippy-Book, a critical vulnerability affecting popular Linux document viewers Atril and Xreader. This vulnerability allows attackers to exploit Directory Traversal and Arbitrary File Write to achieve Remote Code Execution (RCE)…

SAJ0x00IN, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the EPUB extraction routine did not sanitise file paths, allowing directory traversal sequences to escape the intended extraction directory.

Impact

An attacker could achieve remote code execution with the victim's privileges after the user opens a crafted file and logs in again; the text does not mention any defence that would block this.

What the attacker needed

Victim uses Atril or Xreader; victim opens a crafted EPUB/PDF file; attacker can deliver the file to the victim

The fix

The software should be updated to a version that properly sanitises paths when extracting EPUB files, preventing traversal outside the intended directory.

How it was found

  1. Create a .desktop file that runs a reverse shell and make it executable.
  2. Encode the target path by replacing slashes with a placeholder character.
  3. Add the encoded file to an EPUB archive.
  4. Replace the placeholder with path traversal sequences in the archive.
  5. Rename the EPUB to a PDF extension.
  6. Deliver the file to the victim, who opens it in Atril or Xreader, writing the .desktop file to the autostart directory; on next login the reverse shell connects.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A document viewer opens EPUB files, which are like ZIP archives. The viewer failed to check where files inside the EPUB were being saved, so a malicious EPUB could write a file to a special folder that runs programs automatically when you log in. That let an attacker run their own commands on the computer.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.