MEDIUM6.1
PYSEC-2026-1236
Cross-site Scripting (XSS) - DOM in janeczku/calibre-web
Quick fix
PYSEC-2026-1236 — calibreweb: upgrade to the fixed version with the command below.
pip install --upgrade 'calibreweb>=0.6.15'Details
A Cross-site Scripting (XSS) vulnerability exists in janeczku/calibre-web, specifically in the file `edit_books.js`. The vulnerability occurs when editing book properties, such as uploading a cover or a format. The affected code directly inserts user input into the DOM without proper sanitization, allowing attackers to execute arbitrary JavaScript code. This can lead to various attacks, including stealing cookies. The issue is present in the code handling the `#btn-upload-cover` change event.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
- https://nvd.nist.gov/vuln/detail/CVE-2021-3988[ADVISORY]
- https://github.com/janeczku/calibre-web/commit/7ad419dc8c12180e842a82118f4866ac3d074bc5[WEB]
- https://github.com/janeczku/calibre-web[PACKAGE]
- https://huntr.com/bounties/fa4c8fd1-7846-4dad-9112-2c07461f0609[WEB]
- https://pypi.org/project/calibreweb[PACKAGE]
- https://github.com/advisories/GHSA-r735-9gc6-2hvq[ADVISORY]