CVE-2017-16019 Cross-Site Scripting in gitbook
Attackers can execute arbitrary JavaScript in the online reader by injecting code into GitBook ebooks, affecting users viewing the content.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2017-16019?
CVE-2017-16019 is a medium-severity cross-site scripting vulnerability in HackerOne gitbook node module, published on 4 Jun 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
GitBook is a command line tool (and Node.js library) for building beautiful books using GitHub/Git and Markdown (or AsciiDoc). Stored Cross-Site-Scripting (XSS) is possible in GitBook before 3.2.2 by including code outside of backticks in any ebook. This code will be executed on the online reader.
Weakness: CWE-79
Which versions are affected by CVE-2017-16019?
2 open source packages ship an affected version, including gitbook. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
gitbook npm | All versions | 3.2.2 |
gitbook npm | All versions | 3.2.2 |
Products include Gitbook Gitbook.
How do I fix CVE-2017-16019?
Upgrade gitbook to 3.2.2 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2017-16019 being exploited?
There is no known exploitation of CVE-2017-16019 in the wild and no public exploit code.
Other vulnerabilities in HackerOne gitbook node module
Sources
Also known as GHSA-5h5r-23r4-m87h.