CVE-2020-7691 Cross-site Scripting (XSS)
An attacker can inject malicious scripts into PDFs generated by jsPDF, potentially executing code in the viewer's context.
- 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-2020-7691?
CVE-2020-7691 is a medium-severity cross-site scripting vulnerability in jspdf, published on 6 Jul 2020. 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
In all versions of the package jspdf, it is possible to use <<script>script> in order to go over the filtering regex.
Weakness: CWE-79
Which versions are affected by CVE-2020-7691?
2 open source packages ship an affected version, including jspdf. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
jspdf npm | All versions | 2.0.0 |
jspdf npm | All versions | 2.0.0 |
Products include Parall Jspdf.
How do I fix CVE-2020-7691?
Upgrade jspdf to 2.0.0 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-2020-7691 being exploited?
There is no known exploitation of CVE-2020-7691 in the wild and no public exploit code.
Other vulnerabilities in jspdf
- CVE-2026-31938 jsPDF has HTML Injection in New Window paths
- CVE-2025-68428 jsPDF has Local File Inclusion/Path Traversal vulnerability
- CVE-2026-25535 jsPDF Affected by Client-Side/Server-Side Denial of Service via Malicious GIF Dimensions
- CVE-2026-24133 jsPDF Affected by Denial of Service (DoS) via Unvalidated BMP Dimensions in BMPDecoder
- CVE-2025-57810 jsPDF Parsing of Corrupt PNGs Leads to Potential Denial of Service (DoS)
Sources
Also known as GHSA-3q6f-8grx-pr4v.