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

- Severity: Medium 5.7 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.38%, higher than 34% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-11-15T10:52:39.637Z
- Modified: 2026-07-07T17:56:38.666Z
- Also known as: GHSA-r735-9gc6-2hvq, PYSEC-2026-1236
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- janeczku janeczku/calibre-web: from unspecified up to latest
- janeczku calibre-web: before 0.6.15
- calibreweb (PyPI): before 0.6.15

## Every score

- @huntr_ai: CVSS:3.0 5.7 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://huntr.com/bounties/fa4c8fd1-7846-4dad-9112-2c07461f0609> (exploit, web)
- <https://github.com/janeczku/calibre-web/commit/7ad419dc8c12180e842a82118f4866ac3d074bc5> (patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-3988> (advisory)
- <https://github.com/janeczku/calibre-web> (package)
- <https://pypi.org/project/calibreweb> (package)
- <https://github.com/advisories/GHSA-r735-9gc6-2hvq> (advisory)

## Sources

- CVE List: [CVE-2021-3988](https://www.cve.org/CVERecord?id=CVE-2021-3988), CVE Terms of Use, modified 2024-11-20
- GitHub Advisory Database: [GHSA-r735-9gc6-2hvq](https://github.com/advisories/GHSA-r735-9gc6-2hvq), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2021-3988](https://nvd.nist.gov/vuln/detail/CVE-2021-3988), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1236](https://osv.dev/vulnerability/PYSEC-2026-1236), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2021-3988 · Whole record: https://cve.day/CVE-2021-3988.json · Rebuilt by cve.day 2026-11-25T22:58:08.966Z
