{"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-39523 exists.","fix":"Upgrade scancodeio to 32.5.1 or later.","what":"CVE-2023-39523 is a medium-severity command injection vulnerability in nexB scancode.io, published on 7 Aug 2023. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-39523 and fix it if it is affected.\n\nWhat it is: CVE-2023-39523 is a medium-severity command injection vulnerability in nexB scancode.io, published on 7 Aug 2023. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-39523 exists.\n\nAffected packages and fixed versions:\n- scancodeio (PyPI): affected all versions; fixed in 32.5.1\n- scancodeio (PyPI): affected all versions; fixed in 32.5.1\n- scancodeio (PyPI): affected all versions; fixed in 32.5.1\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-39523/ (Markdown: https://insights.sbomify.com/CVE-2023-39523/index.md)","id":"CVE-2023-39523","markdown":"https://insights.sbomify.com/CVE-2023-39523/index.md","name":"CVE-2023-39523","record":{"aliases":["GHSA-2ggp-cmvm-f62f","PYSEC-2026-1904"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"ScanCode.io server","requires_auth":"low_privilege","summary":"Attackers can inject malicious commands via the docker_reference parameter in ScanCode.io, leading to code execution on the server.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"scancode.io","vendor":"nexb"}],"cvss":{"score":6.8,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H","version":"3.1"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"ScanCode.io is a server to script and automate software composition analysis with ScanPipe pipelines. Prior to version 32.5.1, the software has a possible command injection vulnerability in the docker fetch process as it allows to append malicious commands in the `docker_reference` parameter.\n\nIn the function `scanpipe/pipes/fetch.py:fetch_docker_image` the parameter `docker_reference` is user controllable. The `docker_reference` variable is then passed to the vulnerable function `get_docker_image_platform`.  However, the `get_docker_image_plaform` function constructs a shell command with the passed `docker_reference`. The `pipes.run_command` then executes the shell command without any prior sanitization, making the function vulnerable to command injections. A malicious user who is able to create or add inputs to a project can inject commands. Although the command injections are blind and the user will not receive direct feedback without logs, it is still possible to cause damage to the server/container. The vulnerability appears for example if a malicious user adds a semicolon after the input of `docker://;`, it would allow appending malicious commands.\n\nVersion 32.5.1 contains a patch for this issue. The `docker_reference` input should be sanitized to avoid command injections and, as a workaround, one may avoid creating commands with user controlled input directly.","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":"ScanCode.io command injection in docker image fetch process","id":"CVE-2023-39523","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2023"},"n_packages":3,"n_references":4,"next":{"headline":"PrestaShop vulnerable to boolean SQL injection in search product in BO","id":"CVE-2023-39524"},"packages":[{"ecosystem":"PyPI","fixed":["32.5.1"],"introduced":["0"],"last_affected":[],"package":"scancodeio","purl":null,"source":"GHSA-2ggp-cmvm-f62f"},{"ecosystem":"PyPI","fixed":["32.5.1"],"introduced":["0"],"last_affected":[],"package":"scancodeio","purl":"pkg:pypi/scancodeio","source":"GHSA-2ggp-cmvm-f62f"},{"ecosystem":"PyPI","fixed":["32.5.1"],"introduced":["0"],"last_affected":[],"package":"scancodeio","purl":"pkg:pypi/scancodeio","source":"PYSEC-2026-1904"}],"prev":{"headline":"Username enumeration attack in goauthentik","id":"CVE-2023-39522"},"products":["scancode.io"],"published":"2023-08-07","related":[{"cvss_score":5.4,"headline":"Reflected Cross-Site Scripting (XSS) in scancode.io license endpoint","id":"CVE-2023-40024","kev_date_added":null,"published":"2023-08-14"}],"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-03","vendors":["nexB"]},"summary":"Attackers can inject malicious commands via the docker_reference parameter in ScanCode.io, leading to code execution on the server.","url":"https://insights.sbomify.com/CVE-2023-39523/"}