{"answers":{"affected":"3 open source packages ship an affected version, including scancodeio. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-40024 exists.","fix":"Upgrade scancodeio to 32.5.2 or later.","what":"CVE-2023-40024 is a medium-severity cross-site scripting vulnerability in nexB scancode.io, published on 14 Aug 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-40024 and fix it if it is affected.\n\nWhat it is: CVE-2023-40024 is a medium-severity cross-site scripting vulnerability in nexB scancode.io, published on 14 Aug 2023. An attacker can exploit it over the internet without logging in, 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-2023-40024 exists.\n\nAffected packages and fixed versions:\n- scancodeio (PyPI): affected all versions; fixed in 32.5.2\n- scancodeio (PyPI): affected all versions; fixed in 32.5.2\n- scancodeio (PyPI): affected all versions; fixed in 32.5.2\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-2023-40024/ (Markdown: https://insights.sbomify.com/CVE-2023-40024/index.md)","id":"CVE-2023-40024","markdown":"https://insights.sbomify.com/CVE-2023-40024/index.md","name":"CVE-2023-40024","record":{"aliases":["GHSA-6xcx-gx7r-rccj","PYSEC-2026-1905"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover","data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"ScanCode.io server","requires_auth":"none","summary":"Attackers can inject malicious scripts via the license endpoint, leading to session hijacking or data theft for users of ScanCode.io.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"scancode.io","vendor":"nexb"}],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"description":"ScanCode.io is a server to script and automate software composition analysis pipelines. In the `/license/` endpoint, the detailed view key is not properly validated and sanitized, which can result in a potential cross-site scripting (XSS) vulnerability when attempting to access a detailed license view that does not exist. Attackers can exploit this vulnerability to inject malicious scripts into the response generated by the `license_details_view` function. When unsuspecting users visit the page, their browsers will execute the injected scripts, leading to unauthorized actions, session hijacking, or stealing sensitive information. This issue has been addressed in release `32.5.2`. Users are advised to upgrade. There are no known workarounds for this vulnerability.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Reflected Cross-Site Scripting (XSS) in scancode.io license endpoint","id":"CVE-2023-40024","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2023"},"n_packages":3,"n_references":2,"next":{"headline":"Argo CD web terminal session doesn't expire","id":"CVE-2023-40025"},"packages":[{"ecosystem":"PyPI","fixed":["32.5.2"],"introduced":["0"],"last_affected":[],"package":"scancodeio","purl":null,"source":"GHSA-6xcx-gx7r-rccj"},{"ecosystem":"PyPI","fixed":["32.5.2"],"introduced":["0"],"last_affected":[],"package":"scancodeio","purl":"pkg:pypi/scancodeio","source":"GHSA-6xcx-gx7r-rccj"},{"ecosystem":"PyPI","fixed":["32.5.2"],"introduced":["0"],"last_affected":[],"package":"scancodeio","purl":"pkg:pypi/scancodeio","source":"PYSEC-2026-1905"}],"prev":{"headline":"Yaklang Plugin's Fuzztag Component Allows Unauthorized Local File Reading","id":"CVE-2023-40023"},"products":["scancode.io"],"published":"2023-08-14","related":[{"cvss_score":6.8,"headline":"ScanCode.io command injection in docker image fetch process","id":"CVE-2023-39523","kev_date_added":null,"published":"2023-08-07"}],"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)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-10-02","vendors":["nexB"]},"summary":"Attackers can inject malicious scripts via the license endpoint, leading to session hijacking or data theft for users of ScanCode.io.","url":"https://insights.sbomify.com/CVE-2023-40024/"}