{"id":"CVE-2026-55798","published":"2026-07-06T18:44:38Z","modified":"2026-07-07T15:19:40Z","title":"Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path","vendor":"python-pillow","product":"Pillow","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00179,"percentile":0.07623,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst","tags":["x_refsource_MISC"]}],"priority":{"score":4.7,"factors":[{"name":"EPSS percentile","points":1.52},{"name":"CVSS severity","points":3.15}]},"vendorSlug":"python-pillow","affectedVersions":[{"vendor":"python-pillow","product":"Pillow","versions":["< 12.3.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2026-07-07T15:19:30.348707Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"Pillow","vulnerableRanges":["<12.3.0"],"patched":["12.3.0"],"from":["GHSA-4x4j-2g7c-83w6","PYSEC-2026-2257"],"provenance":"source"}],"summary":{"text":"In Pillow, the WindowsViewer.get_command() function builds a cmd.exe shell command by embedding a file path directly into an f-string without escaping it, then runs it through subprocess.Popen with shell=True. An attacker who can get a crafted file path processed by this viewer can inject arbitrary cmd.exe commands through shell metacharacters in that path, which requires the victim to take an action such as opening the file on a Windows system.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:21:22Z"},"euvd":{"id":"EUVD-2026-41898","exploited":false,"provenance":"source"}}