CVE-2020-7690 Cross-site scripting in jspdf

Medium 6.1 Published Updated

Attackers can inject JavaScript via the html method in jsPDF, potentially executing arbitrary code in the victim's browser 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-7690?

CVE-2020-7690 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

All affected versions <2.0.0 of package jspdf are vulnerable to Cross-site Scripting (XSS). It is possible to inject JavaScript code via the html method.

Weakness: CWE-79

Which versions are affected by CVE-2020-7690?

2 open source packages ship an affected version, including jspdf. It affects 1 product.

PackageAffectedFixed in
jspdf npmAll versions2.0.0
jspdf npmAll versions2.0.0

Products include Parall Jspdf.

How do I fix CVE-2020-7690?

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-7690 being exploited?

There is no known exploitation of CVE-2020-7690 in the wild and no public exploit code.

Sources

Also known as GHSA-vh59-v9r5-4mh4, SNYK-JS-JSPDF-575256.

Is CVE-2020-7690 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free