{"id":"CVE-2021-3988","published":"2024-11-15T10:52:39Z","modified":"2024-11-20T22:35:15Z","title":"Cross-site Scripting (XSS) in janeczku/calibre-web","vendor":"janeczku","product":"janeczku/calibre-web","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.7,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0038,"percentile":0.32807,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://huntr.com/bounties/fa4c8fd1-7846-4dad-9112-2c07461f0609","tags":[]},{"url":"https://github.com/janeczku/calibre-web/commit/7ad419dc8c12180e842a82118f4866ac3d074bc5","tags":[]}],"priority":{"score":10.6,"factors":[{"name":"EPSS percentile","points":6.56},{"name":"CVSS severity","points":3.99}]},"vendorSlug":"janeczku","affectedVersions":[{"vendor":"janeczku","product":"janeczku/calibre-web","versions":[">= unspecified, <= latest"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-11-20T22:31:41.647596Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"calibreweb","vulnerableRanges":["<0.6.15"],"patched":["0.6.15"],"from":["GHSA-r735-9gc6-2hvq","PYSEC-2026-1236"],"provenance":"source"}],"summary":{"text":"A cross-site scripting flaw exists in the janeczku/calibre-web product, specifically in the edit_books.js file, where user input is inserted into the DOM without sanitization when book properties such as a cover or format are edited, in the code handling the #btn-upload-cover change event. An attacker with low-privilege authenticated access to the application can exploit it by getting a user to interact with the affected edit functionality, which allows execution of arbitrary JavaScript that can, for example, steal cookies.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:02:23Z"},"euvd":{"id":"EUVD-2024-3306","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-janeczku-calibre-web-cve-2021-25964","parents":[{"from":"CVE-2021-25965","to":"CVE-2021-3988","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["cps/static/js/edit_books.js"],"commits":["https://github.com/janeczku/calibre-web/commit/50919d47212066c75f03ee7a5332ecf2d584b98e","https://github.com/janeczku/calibre-web/commit/7ad419dc8c12180e842a82118f4866ac3d074bc5"],"basis":"rarely changed file"}]}]}}