CVE-2018-3770 Remote Code Execution in markdown-pdf
An attacker can exploit a path traversal vulnerability in the markdown-pdf library to read arbitrary local files from the server.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-3770?
CVE-2018-3770 is a medium-severity path traversal vulnerability in HackerOne markdown-pdf, published on 20 Jul 2018. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
A path traversal exists in markdown-pdf version <9.0.0 that allows a user to insert a malicious html code that can result in reading the local files.
Weakness: CWE-22
Which versions are affected by CVE-2018-3770?
2 open source packages ship an affected version, including markdown-pdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
markdown-pdf npm | All versions | 9.0.0 |
markdown-pdf npm | All versions | 9.0.0 |
Products include Markdown-Pdf Project Markdown-Pdf.
How do I fix CVE-2018-3770?
Upgrade markdown-pdf to 9.0.0 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2018-3770 being exploited?
There is no known exploitation of CVE-2018-3770 in the wild and no public exploit code.
Other vulnerabilities in HackerOne markdown-pdf
Sources
Also known as GHSA-p7c9-jqhq-vr3v.