CVE-2024-39123 Calibre-Web Cross Site Scripting (XSS)

Medium 5.4 Published Updated

Cross-site scripting in Calibre-Web allows attackers to inject malicious scripts via book comments, potentially leading to session hijacking or code execution.

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
None listed

What is CVE-2024-39123?

CVE-2024-39123 is a medium-severity cross-site scripting vulnerability in n/a, published on 19 Jul 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

In janeczku Calibre-Web 0.6.0 to 0.6.21, the edit_book_comments function is vulnerable to Cross Site Scripting (XSS) due to improper sanitization performed by the clean_string function. The vulnerability arises from the way the clean_string function handles HTML sanitization.

Weakness: CWE-79

Which versions are affected by CVE-2024-39123?

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

PackageAffectedFixed in
calibreweb PyPIFrom 0.6.0 to 0.6.21None
calibreweb PyPIFrom 0.6.0 to 0.6.21None
calibreweb PyPIFrom 0.6.0 to 0.6.21None

Products include Janeczku Calibre-Web.

How do I fix CVE-2024-39123?

No fix has been published for CVE-2024-39123 yet. Limit exposure of the affected software until one is available.

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-2024-39123 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39123 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-j22r-3rf3-cv25, PYSEC-2026-1230.

Is CVE-2024-39123 in your software?

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

Check your SBOMs for free