# CVE-2023-39523: ScanCode.io command injection in docker image fetch process

- Severity: Medium 6.8 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.92%, higher than 87% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2023-08-07T20:55:46.855Z
- Modified: 2026-09-10T03:50:08.700Z
- Also known as: GHSA-2ggp-cmvm-f62f, PYSEC-2026-1904
- Weaknesses: CWE-77
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

In 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.

Version 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.

(As written by CVE List.)

## Affected

- nexB scancode.io: < 32.5.1; before 32.5.1
- scancodeio (PyPI): before 32.5.1

## Every score

- GitHub_M: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- GitHub: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 6.8 Medium `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`

## References

- <https://github.com/nexB/scancode.io/security/advisories/GHSA-2ggp-cmvm-f62f> (exploit, patch, vendor-advisory, web)
- <https://github.com/nexB/scancode.io/commit/07ec0de1964b14bf085a1c9a27ece2b61ab6105c> (patch, web)
- <https://github.com/nexB/scancode.io/blob/main/scanpipe/pipes/fetch.py#L185> (product, web)
- <https://github.com/nexB/scancode.io/releases/tag/v32.5.1> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-39523> (advisory)
- <https://github.com/nexB/scancode.io> (package)
- <https://pypi.org/project/scancodeio> (package)
- <https://github.com/advisories/GHSA-2ggp-cmvm-f62f> (advisory)

## Sources

- CVE List: [CVE-2023-39523](https://www.cve.org/CVERecord?id=CVE-2023-39523), CVE Terms of Use, modified 2024-10-03
- GitHub Advisory Database: [GHSA-2ggp-cmvm-f62f](https://github.com/advisories/GHSA-2ggp-cmvm-f62f), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2023-39523](https://nvd.nist.gov/vuln/detail/CVE-2023-39523), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1904](https://osv.dev/vulnerability/PYSEC-2026-1904), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2023-39523 · Whole record: https://cve.day/CVE-2023-39523.json · Rebuilt by cve.day 2026-11-25T22:58:26.832Z
