LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 5.7Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2021-3988 is a cross-site scripting flaw in calibre-web. A logged-in user editing book properties could cause unsafe input to be placed into the page, allowing JavaScript to run in another user’s browser. The main business concern is compromise of browser-session data, especially where editing access is broadly granted.

Executive priority

Treat this as a moderate-priority remediation item. It is not known to be actively exploited from the supplied evidence, but it can affect confidentiality in shared or internet-accessible calibre-web deployments. Prioritize faster if untrusted users have editor permissions.

Technical view

The issue is CWE-79 XSS in janeczku/calibre-web edit_books.js, tied to book editing workflows such as cover or format uploads and the #btn-upload-cover change handler. User-controlled input was inserted into the DOM without adequate sanitization. CVSS 3.0 is 5.7 with PR:L and UI:R, emphasizing authenticated access and user interaction.

Likely exposure

Exposure is most likely where calibre-web is deployed with multiple authenticated users who can edit book metadata or upload covers/formats. Affected versions are not specified in the source bundle, so teams should compare their code or release lineage against the referenced upstream fix.

Exploitation context

The source bundle does not show CISA KEV listing or public active exploitation evidence. Exploitation requires a low-privileged authenticated actor and user interaction, but successful execution could expose sensitive browser data such as cookies, per the vulnerability description.

Researcher notes

Key uncertainty is version scope: the source bundle lists janeczku/calibre-web versions as unspecified. Validation should focus on code comparison with the referenced commit and access-control review. Avoid assuming unauthenticated impact; the CVSS vector indicates privileges required and user interaction required.

Mitigation direction

  • Apply the upstream vendor fix associated with commit 7ad419dc8c12180e842a82118f4866ac3d074bc5.
  • Check calibre-web project guidance for the fixed release containing that commit.
  • Limit book editing and upload permissions to trusted users only.
  • Restrict administrative and editor access to trusted networks where feasible.
  • Rotate sessions after remediation if suspicious editor activity is found.

Validation and detection

  • Inventory all calibre-web deployments and confirm their source or release version.
  • Check whether edit_books.js includes the upstream sanitization fix.
  • Review who has permission to edit books or upload covers/formats.
  • Inspect application logs for unusual book edits or upload activity.
  • Confirm no public evidence source in hand indicates active exploitation.
Prepared
Confidence
medium
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-3988 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
5.7 (3.0)
Known Exploited
No
Published

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
5.7CVSS 3.0MediumCVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N2.13.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.0 score

5.7Medium
CVSS 3.0 vector shape for CVE-2021-3988Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
janeczkujaneczku/calibre-webunspecifiedListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-79 · source CWE mapping

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.