# CVE-2026-55798: Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path

- Severity: Medium 4.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- 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): 0.20%, higher than 9% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-06T18:44:38.441Z
- Modified: 2026-10-25T20:10:00.147Z
- Also known as: GHSA-4x4j-2g7c-83w6, BIT-PILLOW-2026-55798, PYSEC-2026-2257
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Pillow is a Python imaging library. Prior to 12.3.0, WindowsViewer.get_command() constructed a cmd.exe shell command by directly embedding a file path into an f-string without escaping and passed the result to subprocess.Popen(..., shell=True), allowing shell metacharacters in the file path to inject arbitrary cmd.exe commands. This issue is fixed in version 12.3.0.

(As written by CVE List.)

## Affected

- python-pillow Pillow: < 12.3.0
- pillow (PyPI): before 12.3.0
- python pillow: before 12.3.0
- pillow (Bitnami): before 12.3.0

## Every score

- GitHub_M: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- GitHub: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- PyPA Advisory Database: CVSS:3.1 4.5 Medium `CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6> (exploit, advisory, evidence, vendor-advisory, web)
- <https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f> (fix, patch, web)
- <https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst> (advisory, article, release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-55798> (advisory, web)
- <https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2257.yaml> (web)
- <https://github.com/python-pillow/Pillow> (package)

## Sources

- CVE List: [CVE-2026-55798](https://www.cve.org/CVERecord?id=CVE-2026-55798), CVE Terms of Use, modified 2026-07-07
- GitHub Advisory Database: [GHSA-4x4j-2g7c-83w6](https://github.com/advisories/GHSA-4x4j-2g7c-83w6), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-55798](https://nvd.nist.gov/vuln/detail/CVE-2026-55798), Public domain, modified 2026-10-25
- PyPA Advisory Database: [PYSEC-2026-2257](https://osv.dev/vulnerability/PYSEC-2026-2257), CC-BY-4.0, modified 2026-07-13
- Bitnami Vulnerability Database: [BIT-PILLOW-2026-55798](https://osv.dev/vulnerability/BIT-PILLOW-2026-55798), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2026-55798 · Whole record: https://cve.day/CVE-2026-55798.json · Rebuilt by cve.day 2026-11-25T22:59:27.239Z
