{"id":"CVE-2026-55798","state":"PUBLISHED","title":"Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path","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.","publishedAt":"2026-07-06T18:44:38.441Z","updatedAt":"2026-07-07T15:19:40.072Z","severity":{"score":4.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","source":"GitHub_M"},"assigner":"GitHub_M","products":["python-pillow Pillow"],"affected":[{"vendor":"python-pillow","product":"Pillow","versions":[{"version":"< 12.3.0","status":"affected"}]}],"references":["https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6","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/blob/main/docs/releasenotes/12.3.0.rst"],"weaknesses":["CWE-78"],"ingestedAt":"2026-10-29T20:12:24.861Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/55xxx/CVE-2026-55798.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-55798","state":"PUBLISHED","datePublished":"2026-07-06T18:44:38.441Z","dateUpdated":"2026-07-07T15:19:40.072Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-06-17T14:40:28.381Z"},"containers":{"cna":{"title":"Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"python-pillow","product":"Pillow","versions":[{"version":"< 12.3.0","status":"affected"}]}],"references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6","name":"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","name":"https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4","name":"https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4","tags":["x_refsource_MISC"]},{"url":"https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f","name":"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","name":"https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":4.5,"baseSeverity":"MEDIUM","confidentialityImpact":"LOW","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-78","lang":"en","description":"CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-07-06T18:44:38.441Z"},"source":{"advisory":"GHSA-4x4j-2g7c-83w6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-07-07T15:19:30.348707Z","id":"CVE-2026-55798","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-07-07T15:19:40.072Z"}}]}}}