Skip to content
Path traversal Write-up Intermediate

(CVE-2023-2316) Typora Local File Disclosure

Typora before 1.6.7 on Windows and Linux mishandles paths in the typora:// scheme, letting a crafted webpage or markdown file read local files and send them to a remote server. An attacker could exfiltrate local file contents if a user opens a malicious markdown file or pastes text from a malicious page into Typora.

starlabs.sg

Published on starlabs.sg

Typora is a popular cross-platform markdown editor that allows users to create and edit markdown files with a real-time preview feature. It supports various formatting options such as headings, bold, italics, and more.

The author, on starlabs.sg

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 improper validation of paths passed through the typora://app/ scheme, allowing traversal outside the intended directory.

Impact

A crafted webpage or markdown file could cause local files to be read and exfiltrated to a remote server, but only if the user opens the malicious file or pastes text from the malicious page.

What the attacker needed

Typora before 1.6.7 on Windows or Linux; victim opens a malicious markdown file; or victim pastes text from a malicious page

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.

Typora is a markdown editor that can open links using its own typora:// address scheme. Because it did not properly restrict which file paths those links could reach, a malicious page or document could make Typora read files on your computer and send their contents to an attacker. This only happens if you open a crafted markdown file or paste content from a malicious site into Typora.

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.