{"answers":{"affected":"3 open source packages ship an affected version, including calibreweb. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39123 exists.","fix":"No fix has been published for CVE-2024-39123 yet. Limit exposure of the affected software until one is available.","what":"CVE-2024-39123 is a medium-severity cross-site scripting vulnerability in n/a, published on 19 Jul 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2024-39123 and fix it if it is affected.\n\nWhat it is: CVE-2024-39123 is a medium-severity cross-site scripting vulnerability in n/a, published on 19 Jul 2024. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-39123 exists.\n\nAffected packages and fixed versions:\n- calibreweb (PyPI): affected from 0.6.0 up to 0.6.21; no fix listed\n- calibreweb (PyPI): affected from 0.6.0 up to 0.6.21; no fix listed\n- calibreweb (PyPI): affected from 0.6.0 up to 0.6.21; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-39123/ (Markdown: https://insights.sbomify.com/CVE-2024-39123/index.md)","id":"CVE-2024-39123","markdown":"https://insights.sbomify.com/CVE-2024-39123/index.md","name":"CVE-2024-39123","record":{"aliases":["GHSA-j22r-3rf3-cv25","PYSEC-2026-1230"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"Calibre-Web","requires_auth":"low_privilege","summary":"Cross-site scripting in Calibre-Web allows attackers to inject malicious scripts via book comments, potentially leading to session hijacking or code execution.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"calibre-web","vendor":"janeczku"}],"cvss":{"score":5.4,"severity":"medium","source":"cisa-adp","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"In janeczku Calibre-Web 0.6.0 to 0.6.21, the edit_book_comments function is vulnerable to Cross Site Scripting (XSS) due to improper sanitization performed by the clean_string function. The vulnerability arises from the way the clean_string function handles HTML sanitization.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2025-01-10","github_poc":1,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2025-01-10T20:05:24Z","kind":"github_poc","ref":"https://github.com/theexploiters/CVE-2024-39123-Exploit","stars":2,"title":"Exploit For: CVE-2024-39123: Stored XSS in Calibre-web 0.6.21"}],"tier":"weaponised"},"has_fix":false,"headline":"Calibre-Web Cross Site Scripting (XSS)","id":"CVE-2024-39123","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2024"},"n_packages":3,"n_references":1,"next":{"headline":"Roundup Cross-site Scripting Vulnerability","id":"CVE-2024-39124"},"packages":[{"ecosystem":"PyPI","fixed":[],"introduced":["0.6.0"],"last_affected":["0.6.21"],"package":"calibreweb","purl":null,"source":"GHSA-j22r-3rf3-cv25"},{"ecosystem":"PyPI","fixed":[],"introduced":["0.6.0"],"last_affected":["0.6.21"],"package":"calibreweb","purl":"pkg:pypi/calibreweb","source":"GHSA-j22r-3rf3-cv25"},{"ecosystem":"PyPI","fixed":[],"introduced":["0.6.0"],"last_affected":["0.6.21"],"package":"calibreweb","purl":"pkg:pypi/calibreweb","source":"PYSEC-2026-1230"}],"prev":{"headline":"Cross-site request forgery in n/a","id":"CVE-2024-39119"},"products":["n/a"],"published":"2024-07-19","related":[{"cvss_score":9.8,"headline":"SQL injection in calibreweb","id":"CVE-2022-30765","kev_date_added":null,"published":"2022-05-16"},{"cvss_score":9.8,"headline":"Hardcoded credentials in n/a","id":"CVE-2020-12627","kev_date_added":null,"published":"2020-05-04"},{"cvss_score":9.3,"headline":"Server-Side Request Forgery (SSRF) in janeczku/calibre-web","id":"CVE-2022-0990","kev_date_added":null,"published":"2022-04-04"},{"cvss_score":9.1,"headline":"Server-Side Request Forgery (SSRF) in janeczku/calibre-web","id":"CVE-2022-0767","kev_date_added":null,"published":"2022-03-07"},{"cvss_score":9,"headline":"Server-Side Request Forgery (SSRF) in janeczku/calibre-web","id":"CVE-2022-0939","kev_date_added":null,"published":"2022-04-04"},{"cvss_score":8.8,"headline":"Calibre-web - Admin Account Takeover via Cross-Site Request Forgery (CSRF)","id":"CVE-2021-25965","kev_date_added":null,"published":"2021-11-16"},{"cvss_score":8.5,"headline":"Cross-site Scripting (XSS) - Reflected in janeczku/calibre-web","id":"CVE-2022-0352","kev_date_added":null,"published":"2022-01-28"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["n/a"]},"summary":"Cross-site scripting in Calibre-Web allows attackers to inject malicious scripts via book comments, potentially leading to session hijacking or code execution.","url":"https://insights.sbomify.com/CVE-2024-39123/"}