Vulnerability
CVE-2026-55798
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.
35 advisories report this vulnerability, across 5 ecosystems.
Advisories
- ALPINE-EDGE-CVE-2026-55798
- CGA-32gf-42c2-9v56
- CGA-3hw7-8v9j-mcvw
- CGA-4gr7-w2qv-rp57
- CGA-4j7p-hm9w-8x6r
- CGA-4p3v-f7r7-hqv2
- CGA-79wr-whvf-mqmg
- CGA-7xx5-rf4p-x357
- CGA-8wvx-47vq-8927
- CGA-9gcp-v494-c759
- CGA-9xm6-prh8-m7h4
- CGA-cq2x-xm6p-hhqv
- CGA-cvjq-23pj-pc53
- CGA-f2vv-2mvc-c98x
- CGA-fmf6-wx4q-5xjj
- CGA-fr5f-qqxc-68h5
- CGA-g37x-8vh3-63q8
- CGA-g4vx-cp23-p828
- CGA-gg3h-3xgx-8cr7
- CGA-h33p-xv5g-77xh
- CGA-hhqh-h2mx-7w22
- CGA-j5c4-5f2h-69h8
- CGA-mgv2-959c-59fq
- CGA-pr9g-rr9g-pwfr
- CGA-qjw9-7fwp-x556
- CGA-r74f-h9m5-45v2
- CGA-rfv3-qw23-8vfg
- CGA-rr3v-vvh9-cpc6
- CGA-whw3-vx9p-6xq6
- CGA-wv62-9fjj-j86f
- CGA-wx22-m5r6-7rrx
- CGA-xw95-ccp7-769p
-
GHSA-4x4j-2g7c-83w6
Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path
-
PYSEC-2026-2257
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…
-
UBUNTU-CVE-2026-55798
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…
References
- https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst
- https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a
- https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4
- https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6