CVE-2026-55798
MEDIUM 4.5CVSS 3.1Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path
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.
- Published
- 6 Jul 2026
- Last modified
- 25 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-78
- Also known as
- BIT-pillow-2026-55798GHSA-4x4j-2g7c-83w6PYSEC-2026-2257
- Sources
- NVDJSONOSV GHSA-4x4j-2g7c-83w6JSONOSV PYSEC-2026-2257JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| OSV | GitHub | CVSS 3.1 | MEDIUM 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
| OSV | PyPA | CVSS 3.1 | MEDIUM 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | python | pillowcpe:2.3:a:python:pillow:*:*:*:*:*:*:*:* |
< 12.3.0 | 12.3.0 |
| OSV | PyPI | pillow | < 12.3.0 | 12.3.0 |
References
- https://github.com/python-pillow/Pillow/blob/main/docs/releasenotes/12.3.0.rst · Release Notes, WEB, ADVISORY
- https://github.com/python-pillow/Pillow/commit/8404ea5fe5df40fc34aa1e51403dd6fce0778b8a · Patch, WEB, FIX
- https://github.com/python-pillow/Pillow/commit/88194166691b7b603529b8b036ab3ab9cedd2de4 · Patch, WEB, FIX
- https://github.com/python-pillow/Pillow/commit/b0e06caa64c1405aa3da0bb1d2bd9a77ca22de7f · Patch, WEB, FIX
- https://github.com/python-pillow/Pillow/security/advisories/GHSA-4x4j-2g7c-83w6 · Exploit, Vendor Advisory, WEB, EVIDENCE
- https://nvd.nist.gov/vuln/detail/CVE-2026-55798 · ADVISORY
- https://github.com/pypa/advisory-database/tree/main/vulns/pillow/PYSEC-2026-2257.yaml · WEB
- https://github.com/python-pillow/Pillow · PACKAGE
History
- 25 Nov 2026 21:03 UTC · NVD: first stored (published 6 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 6 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 20 Jul 2026)