CVE-2021-4170 Cross-site Scripting (XSS) - Stored in janeczku/calibre-web

High 7.3 Published Updated

Stored Cross-Site Scripting in Calibre Web allows attackers to inject malicious scripts, potentially leading to session hijacking or data theft.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2021-4170?

CVE-2021-4170 is a high-severity cross-site scripting vulnerability in janeczku/calibre-web, published on 16 Jan 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

calibre-web is vulnerable to Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Weakness: CWE-79

Which versions are affected by CVE-2021-4170?

3 open source packages ship an affected version, including calibreweb. It affects 1 product.

PackageAffectedFixed in
calibreweb PyPIAll versions0.6.15
calibreweb PyPIAll versions0.6.15
calibreweb PyPIAll versions0.6.15

Products include Janeczku Calibre-Web.

How do I fix CVE-2021-4170?

Upgrade calibreweb to 0.6.15 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-4170 being exploited?

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

Sources

Also known as GHSA-wrp6-9w7f-3wxg, PYSEC-2026-620.

Is CVE-2021-4170 in your software?

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

Check your SBOMs for free