{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2021-3988",
        "assignerOrgId": "c09c270a-b464-47c1-9133-acb35b22c19a",
        "state": "PUBLISHED",
        "assignerShortName": "@huntr_ai",
        "dateReserved": "2021-11-20T12:40:59.399Z",
        "datePublished": "2024-11-15T10:52:39.637Z",
        "dateUpdated": "2024-11-20T22:35:15.693Z"
    },
    "containers": {
        "cna": {
            "title": "Cross-site Scripting (XSS) in janeczku/calibre-web",
            "providerMetadata": {
                "orgId": "c09c270a-b464-47c1-9133-acb35b22c19a",
                "shortName": "@huntr_ai",
                "dateUpdated": "2024-11-15T10:57:13.347Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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."
                }
            ],
            "affected": [
                {
                    "vendor": "janeczku",
                    "product": "janeczku/calibre-web",
                    "versions": [
                        {
                            "version": "unspecified",
                            "status": "affected",
                            "versionType": "custom",
                            "lessThanOrEqual": "latest"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://huntr.com/bounties/fa4c8fd1-7846-4dad-9112-2c07461f0609"
                },
                {
                    "url": "https://github.com/janeczku/calibre-web/commit/7ad419dc8c12180e842a82118f4866ac3d074bc5"
                }
            ],
            "metrics": [
                {
                    "cvssV3_0": {
                        "version": "3.0",
                        "attackComplexity": "LOW",
                        "attackVector": "NETWORK",
                        "availabilityImpact": "NONE",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "NONE",
                        "privilegesRequired": "LOW",
                        "scope": "UNCHANGED",
                        "userInteraction": "REQUIRED",
                        "vectorString": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:N/A:N",
                        "baseScore": 5.7,
                        "baseSeverity": "MEDIUM"
                    }
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "type": "CWE",
                            "lang": "en",
                            "description": "CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
                            "cweId": "CWE-79"
                        }
                    ]
                }
            ],
            "source": {
                "advisory": "fa4c8fd1-7846-4dad-9112-2c07461f0609",
                "discovery": "EXTERNAL"
            }
        },
        "adp": [
            {
                "affected": [
                    {
                        "vendor": "janeczku",
                        "product": "calibre-web",
                        "cpes": [
                            "cpe:2.3:a:janeczku:calibre-web:*:*:*:*:*:*:*:*"
                        ],
                        "defaultStatus": "unknown",
                        "versions": [
                            {
                                "version": "0",
                                "status": "affected",
                                "lessThan": "0.6.15",
                                "versionType": "custom"
                            }
                        ]
                    }
                ],
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2024-11-20T22:31:41.647596Z",
                                "id": "CVE-2021-3988",
                                "options": [
                                    {
                                        "Exploitation": "poc"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-11-20T22:35:15.693Z"
                }
            }
        ]
    }
}