CVE-2019-15138 Arbitrary File Read in html-pdf
An attacker can read arbitrary local files by crafting an HTML file that uses XMLHttpRequest to access file:/// URLs in the html-pdf library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2019-15138?
CVE-2019-15138 is a high-severity path traversal vulnerability in n/a, published on 20 Sep 2019. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
The html-pdf package 2.2.0 for Node.js has an arbitrary file read vulnerability via an HTML file that uses XMLHttpRequest to access a file:/// URL.
Weakness: CWE-668
Which versions are affected by CVE-2019-15138?
2 open source packages ship an affected version, including html-pdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
html-pdf npm | All versions | 3.0.1 |
html-pdf npm | All versions | 3.0.1 |
Products include Html-Pdf Project Html-Pdf.
How do I fix CVE-2019-15138?
Upgrade html-pdf to 3.0.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2019-15138 being exploited?
There is no known exploitation of CVE-2019-15138 in the wild and no public exploit code.
Sources
Also known as GHSA-x4w5-r546-x9qh.