Miggo Logo

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

6.8

CVSS Score
3.1

Basic Information

EPSS Score
0.81571%
Published
8/9/2023
Updated
11/4/2023
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
scancodeiopip<= 32.5.032.5.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key points:

  1. fetch_docker_image accepts user-controlled docker_reference without validation (CWE-77)
  2. get_docker_image_platform directly interpolates this input into a shell command string executed with pipes.run_command (which used shell=True pre-patch).

The PoC demonstrates injection via ;-separated commands in docker_reference. The commit fix added regex validation in fetch_docker_image and switched to safe subprocess execution in get_docker_image_platform, confirming these were the vulnerable points.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

## *omm*n* Inj**tion in *o*k*r **t** pro**ss ### Summ*ry * possi*l* *omm*n* inj**tion in t** *o*k*r **t** pro**ss *s it *llows to *pp*n* m*li*ious *omm*n*s in t** *o*k*r_r***r*n** p*r*m*t*r. ### **t*ils In t** *un*tion `s**npip*/pip*s/**t**.py:**t

Reasoning

T** vuln*r**ility st*ms *rom two k*y points: *. **t**_*o*k*r_im*** ****pts us*r-*ontroll** *o*k*r_r***r*n** wit*out v*li**tion (*W*-**) *. **t_*o*k*r_im***_pl*t*orm *ir**tly int*rpol*t*s t*is input into * s**ll *omm*n* strin* *x**ut** wit* pip*s.run_