{"id":"CVE-2023-40024","aliases":["EUVD-2023-2227","GHSA-6xcx-gx7r-rccj","PYSEC-2026-1905"],"status":"published","title":"Reflected Cross-Site Scripting (XSS) in scancode.io license endpoint","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.","severity":{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-12","score":0.00506,"percentile":0.43706,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2023-08-14T19:53:24Z","modified":"2026-10-28T02:30:33Z","fixes":[{"ecosystem":"PyPI","package":"scancodeio","fixed_in":["32.5.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"PyPI","package":"scancodeio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"32.5.1"},{"fixed":"32.5.2"}]}]},{"source":"osv","ecosystem":"PyPI","package":"scancodeio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"32.5.2"}]}],"versions":["32.0.1","32.1.0","32.2.0","32.4.0","32.5.0","32.5.1"]},{"source":"osv","ecosystem":"PyPI","package":"scancodeio","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"32.5.2"}]}],"versions":["32.0.1","32.1.0","32.2.0","32.4.0","32.5.0","32.5.1"]}],"products":[{"vendor":"nexb","product":"scancode.io"}],"references":[{"url":"https://github.com/nexB/scancode.io/security/advisories/GHSA-6xcx-gx7r-rccj","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/nexB/scancode.io/blob/dd7769fbc97c84545579cebf1dc4838214098a11/CHANGELOG.rst#v3252-2023-08-14","tags":["x_refsource_MISC","x_transferred","Release Notes","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-40024","tags":["advisory"]},{"url":"https://github.com/nexB/scancode.io/releases/tag/v32.5.2","tags":["web"]},{"url":"https://github.com/advisories/GHSA-6xcx-gx7r-rccj","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/40xxx/CVE-2023-40024.json","tags":["advisory"]},{"url":"https://github.com/nexB/scancode.io","tags":["package"]},{"url":"https://pypi.org/project/scancodeio","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2023-40024","title":"Reflected Cross-Site Scripting (XSS) in scancode.io license endpoint","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.","status":"published","published":"2023-08-14T19:53:24.808Z","modified":"2024-10-02T20:36:40.644Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:35:21.971258Z"}],"euvd":[{"id":"EUVD-2023-2227","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.","status":"published","published":"2023-08-14T19:53:24Z","modified":"2024-10-02T20:36:40Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T00:27:54.651509Z"}],"ghsa":[{"id":"GHSA-6xcx-gx7r-rccj","title":"Scancode.io Reflected Cross-Site Scripting (XSS) in license endpoint","description":"### Summary\nIn 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.\n\n### Details\nIn the `/license/` endpoint, the `license_details_view` function is vulnerable to a potential cross-site scripting (XSS) attack due to inadequate validation and sanitization of the `key` parameter. This vulnerability arises when attempting to access a key with malicious javascript.\n\n```python\ndef license_details_view(request, key):\n    \"\"\"\n    Display all available information about a given license `key` followed by\n    the full license text.\n    \"\"\"\n    licenses = get_licenses()\n    try:\n        data = saneyaml.dump(licenses[key].to_dict())\n        text = licenses[key].text\n    except KeyError:\n        return HttpResponseNotFound(f\"License {key} not found.\") # Leads to cross-site scripting when key is malicious javascript\n    return HttpResponse(f\"\u003cpre\u003e{data}\u003c/pre\u003e\u003chr\u003e\u003cpre\u003e{text}\u003c/pre\u003e\")\n```\n\n\n### PoC\n1. Access following endpoint on scancode.io instance: http://localhost/license/%3Cscript%3Ealert(document.cookie);%3C/script%3E/\n\n### Impact\nAttackers can exploit the 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.\n","status":"published","published":"2023-08-15T20:04:49Z","modified":"2023-11-06T05:03:38Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:37:14.234712Z"}],"nvd":[{"id":"CVE-2023-40024","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.","status":"published","published":"2023-08-14T20:15:12.837Z","modified":"2026-06-17T06:15:48.16Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:08:24.487686Z"}],"osv":[{"id":"CVE-2023-40024","title":"Reflected Cross-Site Scripting (XSS) in scancode.io license endpoint","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.","status":"published","published":"2023-08-14T19:53:24.808Z","modified":"2026-10-28T02:30:33.481938498Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:33.244128Z"},{"id":"GHSA-6xcx-gx7r-rccj","title":"Scancode.io Reflected Cross-Site Scripting (XSS) in license endpoint","description":"### Summary\nIn 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.\n\n### Details\nIn the `/license/` endpoint, the `license_details_view` function is vulnerable to a potential cross-site scripting (XSS) attack due to inadequate validation and sanitization of the `key` parameter. This vulnerability arises when attempting to access a key with malicious javascript.\n\n```python\ndef license_details_view(request, key):\n    \"\"\"\n    Display all available information about a given license `key` followed by\n    the full license text.\n    \"\"\"\n    licenses = get_licenses()\n    try:\n        data = saneyaml.dump(licenses[key].to_dict())\n        text = licenses[key].text\n    except KeyError:\n        return HttpResponseNotFound(f\"License {key} not found.\") # Leads to cross-site scripting when key is malicious javascript\n    return HttpResponse(f\"\u003cpre\u003e{data}\u003c/pre\u003e\u003chr\u003e\u003cpre\u003e{text}\u003c/pre\u003e\")\n```\n\n\n### PoC\n1. Access following endpoint on scancode.io instance: http://localhost/license/%3Cscript%3Ealert(document.cookie);%3C/script%3E/\n\n### Impact\nAttackers can exploit the 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.\n","status":"published","published":"2023-08-15T20:04:49Z","modified":"2026-09-10T03:49:57.536585679Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:40.308826Z"},{"id":"PYSEC-2026-1905","title":"Scancode.io Reflected Cross-Site Scripting (XSS) in license endpoint","description":"### Summary\nIn 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.\n\n### Details\nIn the `/license/` endpoint, the `license_details_view` function is vulnerable to a potential cross-site scripting (XSS) attack due to inadequate validation and sanitization of the `key` parameter. This vulnerability arises when attempting to access a key with malicious javascript.\n\n```python\ndef license_details_view(request, key):\n    \"\"\"\n    Display all available information about a given license `key` followed by\n    the full license text.\n    \"\"\"\n    licenses = get_licenses()\n    try:\n        data = saneyaml.dump(licenses[key].to_dict())\n        text = licenses[key].text\n    except KeyError:\n        return HttpResponseNotFound(f\"License {key} not found.\") # Leads to cross-site scripting when key is malicious javascript\n    return HttpResponse(f\"\u003cpre\u003e{data}\u003c/pre\u003e\u003chr\u003e\u003cpre\u003e{text}\u003c/pre\u003e\")\n```\n\n\n### PoC\n1. Access following endpoint on scancode.io instance: http://localhost/license/%3Cscript%3Ealert(document.cookie);%3C/script%3E/\n\n### Impact\nAttackers can exploit the 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.\n","status":"published","published":"2026-07-07T11:45:22.677621Z","modified":"2026-07-07T17:47:51.792846203Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-02T15:52:55.537808Z"}]}}
