CVE-2021-33040 Cross-site Scripting in epubjs

Medium 6.1 Published Updated

Cross-site scripting vulnerability in EPub.js allows attackers to inject malicious scripts via iframe.js, potentially compromising user sessions.

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-2021-33040?

CVE-2021-33040 is a medium-severity cross-site scripting vulnerability in n/a, published on 17 Jan 2022. 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

managers/views/iframe.js in FuturePress EPub.js before 0.3.89 allows XSS.

Weakness: CWE-79

Which versions are affected by CVE-2021-33040?

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

PackageAffectedFixed in
epubjs npmAll versions0.3.89
epubjs npmAll versions0.3.89

Products include Futurepress Epub.js.

How do I fix CVE-2021-33040?

Upgrade epubjs to 0.3.89 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-2021-33040 being exploited?

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

Sources

Also known as GHSA-c6rp-xvqv-mwmf.

Is CVE-2021-33040 in your software?

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

Check your SBOMs for free