CVE-2017-16019 — gitbook
MEDIUMCVE-2017-16019 is a medium-severity (CVSS 6.1) Cross-site Scripting (XSS) vulnerability in gitbook. 1 public exploit or proof-of-concept reference is indexed, so weaponization risk is real. A fix is available for gitbook — see the affected versions and patch details below.
Cross-Site Scripting in gitbook
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.
gitbooknpmDescription
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | gitbook | all versions | 3.2.2npm install gitbook@3.2.2 |
Affected Products
gitbookgitbookResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gitbook, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update gitbook to 3.2.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2017-16019 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is CVE-2017-16019 in your dependencies?
Find it across npm, including transitive dependencies.