CVE-2020-18336
📋 TL;DR
This vulnerability allows remote attackers to execute arbitrary JavaScript code in Typora's PDF export function, potentially stealing sensitive information from users. It affects Typora users who export documents containing malicious content to PDF format. The attacker can craft a document that triggers XSS when exported.
💻 Affected Systems
- Typora
📦 What is this software?
Typora by Typora
⚠️ Risk & Real-World Impact
Worst Case
Attacker steals session cookies, authentication tokens, or local file contents, leading to account compromise or data exfiltration.
Likely Case
Attacker steals user data displayed in Typora during PDF export, such as credentials or sensitive information from other documents.
If Mitigated
Limited impact if users only export trusted documents and have browser security controls enabled.
🎯 Exploit Status
Exploit requires user to open a malicious markdown file and export it to PDF. Proof of concept available in GitHub issues.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v0.9.66 and later
Vendor Advisory: https://github.com/typora/typora-issues/issues/2232
Restart Required: Yes
Instructions:
1. Open Typora. 2. Go to Help > Check for Updates. 3. Download and install v0.9.66 or later. 4. Restart Typora.
🔧 Temporary Workarounds
Disable PDF Export
allTemporarily disable PDF export functionality to prevent exploitation.
Use Trusted Documents Only
allOnly open and export documents from trusted sources.
🧯 If You Can't Patch
- Avoid exporting untrusted documents to PDF format
- Use alternative markdown editors for processing untrusted content
🔍 How to Verify
Check if Vulnerable:
Check Typora version in Help > About. If version is 0.9.65 or earlier, you are vulnerable.
Check Version:
On macOS/Linux: typora --version (if installed via command line). On Windows: Check About dialog in application.
Verify Fix Applied:
Confirm version is 0.9.66 or later in Help > About.
📡 Detection & Monitoring
Log Indicators:
- Unusual PDF export operations with suspicious filenames
- Multiple failed export attempts
Network Indicators:
- Outbound connections to suspicious domains during PDF export
SIEM Query:
Process execution: typora.exe AND Command line contains 'export' AND 'pdf'