<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-02T16:07:12.023203+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/bit-pillow-2026-55798</id>
    <title>BIT-pillow-2026-55798 — Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path</title>
    <updated>2026-10-02T16:07:13.203311+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> Bitnami: pillow</p>
<p>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.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/bit-pillow-2026-55798"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2026-55798</id>
    <title>CVE-2026-55798 — Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path</title>
    <updated>2026-10-02T16:07:13.203529+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> python-pillow Pillow</p>
<p>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.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2026-55798"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/ghsa-4x4j-2g7c-83w6</id>
    <title>GHSA-4x4j-2g7c-83w6 — Pillow: WindowsViewer.get_command() OS command injection via unescaped shell path</title>
    <updated>2026-10-02T16:07:13.203600+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: Pillow</p>
<p>### 1. Summary</p>
<p>`WindowsViewer.get_command()` constructs a `cmd.exe` shell command by directly embedding a
file path into an f-string without escaping. The result is passed to
`subprocess.Popen(..., shell=True)`. Shell metacharacters in the file path — most
importantly a double-quote (`"`) that breaks out of the wrapping, followed by `&amp;` — allow
injection of arbitrary `cmd.exe` commands.</p>
<p>The macOS equivalent (`MacViewer`) correctly applies `shlex.quote()` to the same parameter.
The Linux equivalent (`UnixViewer`) does likewise. Windows is the only platform missing this
protection, despite `shlex.quote` being **already imported** on line 21 of `ImageShow.py`.</p>
<p>---</p>
<p>### 2. Vulnerable Code</p>
<p>**File:** `src/PIL/ImageShow.py`, lines 133–150</p>
<p>```python
class WindowsViewer(Viewer):
    format = "PNG"
    options = {"compress_level": 1, "save_all": True}</p>
<p>def get_command(self, file: str, **options: Any) -&gt; str:
        return (
            f'start "Pillow" /WAIT "{file}" '    # ← f-string, no escaping
            "&amp;&amp; ping -n 4 127.0.0.1 &gt;NUL "
            f'&amp;&amp; del /f "{file}"'                # ← same path, unescaped again
        )</p>
<p>def show_file(self, path: str, **options: Any) -&gt; int:
        if not os.path.exists(path):
            raise FileNotFoundError
        subprocess.Popen(
            self.get_command(path, **options),
            shell=True,                          # ← shell=True
            creationflags=getattr(subprocess, "CREATE_NO_WINDOW"),
        )  # nos…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/ghsa-4x4j-2g7c-83w6"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/pysec-2026-2257</id>
    <title>PYSEC-2026-2257</title>
    <updated>2026-10-02T16:07:13.203710+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: pillow</p>
<p>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.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/pysec-2026-2257"/>
  </entry>
</feed>
