Pillow is a Python imaging library. From 2.6.0 until 13.0.0, Pillow is vulnerable to argument injection when invoking Ghostscript for EPS input. EpsImagePlugin.Ghostscript passes a caller-controlled input filename after -f without converting it to a safe absolute path, so a name beginning with a hyphen can be interpreted as a Ghostscript option. An attacker who controls the filename can inject Ghostscript arguments. Arbitrary command execution specifically requires a leading @ argument-file filename and control of the referenced text file containing additional Ghostscript arguments; the reported chain reproduces with the default -dSAFER invocation. This issue is fixed in version 13.0.0.
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Pillow | Python | 2.6.0 (including) | 13.0.0 (excluding) |
| Red Hat Enterprise Linux 8 | RedHat | python-pillow-0:5.1.1-36.el8_10 | * |
| Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support | RedHat | python-pillow-0:5.1.1-15.el8_4.3 | * |
| Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On | RedHat | python-pillow-0:5.1.1-15.el8_4.3 | * |
| Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support | RedHat | python-pillow-0:5.1.1-20.el8_6.2 | * |
| Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On | RedHat | python-pillow-0:5.1.1-20.el8_6.2 | * |
| Red Hat Enterprise Linux 8.8 Telecommunications Update Service | RedHat | python-pillow-0:5.1.1-20.el8_8.2 | * |
| Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions | RedHat | python-pillow-0:5.1.1-20.el8_8.2 | * |
| Exploit Intelligence 3.1 | RedHat | exploit-intelligence/vulnerability-analysis-rhel9:1794542867 | * |
| Red Hat AI Inference Server 3.2 | RedHat | rhaiis/vllm-rocm-rhel9:1793961846 | * |
| Red Hat AI Inference Server 3.2 | RedHat | rhaiis/model-opt-cuda-rhel9:1793962303 | * |
| Red Hat AI Inference Server 3.2 | RedHat | rhaiis/vllm-cuda-rhel9:1793961309 | * |
| Red Hat AI Inference Server 3.5 | RedHat | rhaii/vllm-cpu-rhel9:1793444554 | * |
| Red Hat AI Inference Server 3.5 | RedHat | rhaii/vllm-rocm-rhel9:1793444456 | * |
| Red Hat AI Inference Server 3.5 | RedHat | rhaii/model-opt-cuda-rhel9:1793444339 | * |
| Red Hat AI Inference Server 3.5 | RedHat | rhaii/vllm-spyre-rhel9:1793444409 | * |
| Red Hat AI Inference Server 3.5 | RedHat | rhaii/vllm-gaudi-rhel9:1793444510 | * |
| Red Hat AI Inference Server 3.5 | RedHat | rhaii/vllm-cuda-rhel9:1793444600 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/disk-image-cuda-rhel9:1793995863 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/bootc-aws-cuda-rhel9:1793973314 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/bootc-azure-cuda-rhel9:1793973314 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/bootc-azure-rocm-rhel9:1793973314 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/bootc-cuda-rhel9:1793914518 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/bootc-gcp-cuda-rhel9:1793973312 | * |
| Red Hat Enterprise Linux AI 3.5 | RedHat | rhelai3/bootc-rocm-rhel9:1793914504 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-autorag-rhel9:1795071649 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-ogx-core-rhel9:1795071583 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-openvino-model-server-rhel9:1795069988 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-pipeline-runtime-datascience-cpu-py312-rhel9:1795072861 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-pipeline-runtime-pytorch-cuda-py312-rhel9:1795071742 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-pipeline-runtime-pytorch-llmcompressor-cuda-py312-rhel9:1795071402 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-pipeline-runtime-pytorch-rocm-py312-rhel9:1795071162 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-pipeline-runtime-tensorflow-cuda-py312-rhel9:1795071055 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-pipeline-runtime-tensorflow-rocm-py312-rhel9:1795070866 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-th-torch-cpu-py312-rhel9:1795075004 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-th-torch-cuda-py312-rhel9:1795075406 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-th-torch-rocm-py312-rhel9:1795073002 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-training-cuda128-torch29-py312-rhel9:1795069958 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-training-rocm64-torch29-py312-rhel9:1795070080 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-trustyai-nemo-guardrails-server-rhel9:1795071326 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-codeserver-datascience-cpu-py312-rhel9:1795072884 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-datascience-cpu-py312-rhel9:1795073110 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-pytorch-cuda-py312-rhel9:1795072135 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-pytorch-llmcompressor-cuda-py312-rhel9:1795073961 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-pytorch-rocm-py312-rhel9:1795070991 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-tensorflow-cuda-py312-rhel9:1795071120 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-tensorflow-rocm-py312-rhel9:1795070795 | * |
| Red Hat OpenShift AI 3.5 | RedHat | rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9:1795073012 | * |
| Pillow | Ubuntu | devel | * |
| Pillow | Ubuntu | esm-infra-legacy/xenial | * |
| Pillow | Ubuntu | esm-infra/bionic | * |
| Pillow | Ubuntu | esm-infra/focal | * |
| Pillow | Ubuntu | jammy | * |
| Pillow | Ubuntu | noble | * |
| Pillow | Ubuntu | resolute | * |
| Pillow | Ubuntu | stonking | * |
| Pillow | Ubuntu | upstream | * |
| Pillow-python2 | Ubuntu | esm-apps/focal | * |
This weakness can lead to a vulnerability in environments in which the attacker does not have direct access to the operating system, such as in web applications. Alternately, if the weakness occurs in a privileged program, it could allow the attacker to specify commands that normally would not be accessible, or to call alternate commands with privileges that the attacker does not have. The problem is exacerbated if the compromised process does not follow the principle of least privilege, because the attacker-controlled commands may run with special system privileges that increases the amount of damage. There are at least two subtypes of OS command injection:
From a weakness standpoint, these variants represent distinct programmer errors. In the first variant, the programmer clearly intends that input from untrusted parties will be part of the arguments in the command to be executed. In the second variant, the programmer does not intend for the command to be accessible to any untrusted party, but the programmer probably has not accounted for alternate ways in which malicious attackers can provide input.