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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.8
- **CVSS:** 6.8 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 3.82% (percentile 91, 2026-11-28)
- **CWE:** CWE-77
- **Aliases:** GHSA-2ggp-cmvm-f62f, PYSEC-2026-1904
- **Published:** 2023-08-07T20:55:46.855Z
- **Modified:** 2026-09-10T03:50:08.700Z

## Who should check

- Projects that depend on PyPI package scancodeio (\< 32.5.1)
- Anyone running nexB scancode.io \< 32.5.1

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

## Affected and fixed versions

- PyPI `scancodeio`: affected \< 32.5.1; fixed 32.5.1 (osv)
- nexB scancode.io: \< 32.5.1 (cvelist)

## Mitigation

- Upgrade scancodeio to 32.5.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-39523. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-39523.md
Affected: scancodeio < 32.5.1
Fixed in: 32.5.1

Steps:
1. Search this machine and project for scancodeio (PyPI), nexB scancode.io: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-39523 being exploited?

There is no confirmed exploitation: CVE-2023-39523 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 3.82% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2023-39523?

Medium: CVSS 6.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-39523?

scancodeio \< 32.5.1.

### Is there a fix for CVE-2023-39523?

Yes. Fixed in 32.5.1. Upgrade scancodeio to 32.5.1 or later.

### How do I check if I'm affected by CVE-2023-39523?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

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

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-39523>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-2ggp-cmvm-f62f> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2026-1904> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-39523> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-39523>
