{
  "url": "https://tldrcve.com/upload2shell/",
  "json": "https://tldrcve.com/upload2shell.json",
  "verdict_label": "Patch now if…",
  "scare_label": "Check today",
  "slug": "upload2shell",
  "name": "Upload2Shell",
  "aliases": [
    "ghostscript",
    "gs",
    "ghostpdl",
    "libgs",
    "upload2shell",
    "imagemagick",
    "imagick",
    "pillow",
    "cups",
    "roundcube",
    "wordpress",
    "postscript",
    "cve-2026-65640",
    "cve-2026-114727",
    "cve-2026-110133",
    "cve-2026-112922",
    "cve-2026-103226",
    "cve-2026-19547",
    "cve-2026-39919"
  ],
  "cves": [
    "CVE-2026-125396"
  ],
  "product": "Ghostscript",
  "disclosed": "2026-09-08",
  "news": "2026-11-21",
  "updated": "2026-11-22",
  "verdict": "if",
  "tile_line": "Outsiders' files reach it. Full exploit announced.",
  "summary": "A bug in Ghostscript before 10.08.0 lets a crafted file escape Ghostscript's `-dSAFER` sandbox and run commands as the account doing the rendering. The file holds PostScript but can be uploaded as an image named `.png` or `.jpg`: image libraries such as ImageMagick and Pillow pick the format from the content and hand it to Ghostscript, which also runs behind email thumbnails and print servers; the researchers ran commands through Debian's CUPS, Roundcube, WordPress and more. The CVE record scores it as a local attack (8.5), but those routes are remote. The researchers published a proof of concept that does most of the work: it takes control of Ghostscript's memory (tested on 10.07.0, x86-64 Linux), and their write-up shows the remaining steps to running commands in excerpts; one of them relies on memory offsets from the researchers' test build. They say a full exploit for the Debian CUPS route comes next. No attacks are reported yet.",
  "affected": [
    {
      "label": "Ghostscript before 10.08.0",
      "text": "Distros backport the fix without changing `gs --version`, so check the package instead: fixed in Debian 12 `10.0.0~dfsg-11+deb12u9`, Debian 13 `10.05.1~dfsg-1+deb13u2`, Ubuntu 24.04 `10.02.1~dfsg1-0ubuntu7.10` and 22.04 `9.55.0~dfsg1-0ubuntu5.15` (newer releases too; older ones through Ubuntu Pro). Ubuntu's notice USN-8949-1 lists this bug as \"No CVE number\" (the researchers link it to this CVE), while Ubuntu's CVE tracker still says \"Needs evaluation\" for every release. No fixed package yet on 22 Nov 2026: Amazon Linux 2, 2023 and 2027 Preview (\"Pending Fix\"), SUSE Linux Enterprise 15 SP7 and 16 (\"In progress\"), openSUSE Leap 16 (\"Affected\"). The 10.08.0 release candidate (18 Aug) also calls itself 10.08.0 but came before the fixes, so check it isn't what you run. Container images carry their own copy.",
      "cmd": "gs --version",
      "cite": [
        1,
        3,
        4,
        6,
        7,
        15,
        16,
        17,
        23,
        24
      ]
    },
    {
      "label": "It renders files from outsiders",
      "text": "Something passes files you don't control to Ghostscript. Common routes: image or PDF previews through ImageMagick/Imagick, Pillow (EPS files, once pixels are loaded) or libvips with ImageMagick loaders; these check the file's content, not its name, so a `.png` upload counts. It doesn't have to be a PDF: the researcher says an image or a video can carry it (the write-up tests images and documents, not video). Also: Roundcube attachment thumbnails (before 1.6.20 / 1.7.5), WordPress uploads by Authors and up or public plugin upload forms (before 7.0.4 / 6.9.7), CUPS print queues shared without a login, and document importers that convert PDFs. On a desktop, the CVE record's score assumes a user opens the file.",
      "cite": [
        1,
        2,
        3,
        8,
        13,
        14,
        20
      ]
    }
  ],
  "do": [
    {
      "label": "Outsiders' files reach it? Update now",
      "text": "Upload forms, previews, email thumbnails, shared print queues: don't wait for attacks, because the public proof of concept and write-up cover most of an exploit. Update to 10.08.0 or your distro's fixed package: Debian DLA-4914-1 and DSA-6516-1, Ubuntu USN-8949-1 (it lists the bug without a CVE number). This fixes every route at once. 10.08.0 also fixes five other Ghostscript CVEs (CVE-2026-110133, -112922, -103226, -19547 and -39919); Artifex's own CVE list doesn't name this one. One of them, CVE-2026-39919, is a JPEG 2000 overflow in PDFs; Wordfence's two exploits for it only worked on the exact Ghostscript build they were made for, Wordfence hasn't published them, and no attacks are reported. Amazon Linux, SUSE Linux Enterprise 15 SP7 and 16, and openSUSE Leap 16 have no fixed package yet: cut the route (below) until they do. Rebuild container images that install Ghostscript.",
      "cite": [
        3,
        4,
        5,
        6,
        7,
        15,
        16,
        18,
        19,
        21,
        22,
        23
      ],
      "versions": [
        "ghostscript"
      ]
    },
    {
      "label": "Update the apps that reach it",
      "text": "WordPress 7.0.4 or 6.9.7 (fixes go back to 4.7) closes the upload route as CVE-2026-65640. Roundcube 1.6.20 or 1.7.5 stops passing EPS and SVG to ImageMagick (CVE-2026-114727). These help, but the Ghostscript update fixes the bug itself.",
      "cite": [
        8,
        9,
        14
      ],
      "versions": [
        "wordpress"
      ]
    },
    {
      "label": "Print servers: require a login",
      "text": "Requiring authentication on a shared CUPS queue blocked the researchers' anonymous print job.",
      "cite": [
        3
      ]
    },
    {
      "label": "Can't update yet? Cut the route",
      "text": "ImageMagick: its security policy docs show this `policy.xml` line to stop it running Ghostscript and other external delegates (ImageMagick 7.0.1-8 and later). Python: pass `formats=[\"PNG\", \"JPEG\"]` (whatever you accept) to Pillow's `Image.open()` so EPS is never loaded. Neither covers print servers or apps that call `gs` directly.",
      "cmd": "<policy domain=\"delegate\" rights=\"none\" pattern=\"*\"/>",
      "cite": [
        11,
        12,
        13
      ]
    },
    {
      "label": "What would make this Patch now",
      "text": "Attacks reported, the researchers' announced full exploit (the Debian CUPS route) or another one published, or a listing on CISA's exploited list (KEV).",
      "cite": [
        3,
        10
      ]
    }
  ],
  "fixed_in": {
    "ghostscript": {
      "10.08": "10.08.0"
    },
    "wordpress": {
      "7.0": "7.0.4",
      "6.9": "6.9.7",
      "6.8": "6.8.8"
    }
  },
  "slack": "Upload2Shell (CVE-2026-125396): a crafted PostScript/PDF file escapes Ghostscript's -dSAFER sandbox and runs commands as the rendering user, in Ghostscript before 10.08.0. Reachable remotely wherever a server renders outsiders' files: ImageMagick/Imagick or Pillow previews (even files named .png), Roundcube thumbnails, WordPress uploads, shared CUPS queues. Proof of concept public and does most of the work (memory control on 10.07.0 x86-64; the remaining steps to commands are shown in excerpts), researchers say a full exploit comes next, no attacks seen yet, not in KEV. If outsiders' files reach Ghostscript, update now. Fix: Ghostscript 10.08.0 or distro packages (DSA-6516-1, DLA-4914-1, USN-8949-1); WordPress 7.0.4 / 6.9.7, Roundcube 1.6.20 / 1.7.5.",
  "sources": [
    {
      "title": "CVE record (VulnCheck): before 10.08.0, CVSS 8.5 local; CISA on 10 Nov: no exploitation",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-125396",
      "date": "9 Nov"
    },
    {
      "title": "pwn.ai: Upload2Shell timeline and confirmed app routes",
      "url": "https://pwn.ai/upload2shell"
    },
    {
      "title": "pwn.ai: technical write-up, CUPS, Roundcube, WordPress, image libraries",
      "url": "https://pwn.ai/upload2shell/research.html",
      "date": "17 Nov"
    },
    {
      "title": "Artifex: Ghostscript 10.08.0 release",
      "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs10080",
      "date": "8 Sep"
    },
    {
      "title": "Artifex: fix commit",
      "url": "https://github.com/ArtifexSoftware/ghostpdl/commit/1484854e0c8ddfda1baa4ad4cd965b8a9790aa81"
    },
    {
      "title": "Debian tracker: DLA-4914-1 and DSA-6516-1 fixed packages",
      "url": "https://security-tracker.debian.org/tracker/CVE-2026-125396"
    },
    {
      "title": "Ubuntu: USN-8949-1 fixed packages",
      "url": "https://ubuntu.com/security/notices/USN-8949-1",
      "date": "21 Oct"
    },
    {
      "title": "WordPress: CVE-2026-65640 advisory, fixed versions",
      "url": "https://github.com/WordPress/wordpress-develop/security/advisories/GHSA-8vr3-7mxf-gx8w",
      "date": "12 Aug"
    },
    {
      "title": "WordPress: 7.0.4 security release",
      "url": "https://wordpress.org/news/2026/08/wordpress-7-0-4-release/",
      "date": "12 Aug"
    },
    {
      "title": "CISA KEV catalog: not listed",
      "url": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
    },
    {
      "title": "ImageMagick: security policy, disabling delegates",
      "url": "https://imagemagick.org/security-policy/"
    },
    {
      "title": "Pillow docs: Image.open formats argument",
      "url": "https://pillow.readthedocs.io/en/stable/reference/Image.html"
    },
    {
      "title": "Pillow docs: EPS files use Ghostscript",
      "url": "https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html"
    },
    {
      "title": "CVE record: CVE-2026-114727, Roundcube 1.6.20 / 1.7.5",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-114727",
      "date": "22 Oct"
    },
    {
      "title": "Amazon Linux: ghostscript fix pending for AL2, AL2023, AL2027 Preview",
      "url": "https://explore.alas.aws.amazon.com/CVE-2026-125396.html"
    },
    {
      "title": "SUSE: SLE 15 SP7 and 16 in progress, openSUSE Leap 16 affected",
      "url": "https://www.suse.com/security/cve/CVE-2026-125396.html"
    },
    {
      "title": "Ubuntu CVE tracker: CVE-2026-125396 \"Needs evaluation\" on every release",
      "url": "https://ubuntu.com/security/CVE-2026-125396"
    },
    {
      "title": "Ghostscript: CVEs fixed in 10.08.0 (doesn't list CVE-2026-125396)",
      "url": "https://www.ghostscript.com/releases/cve/index.html"
    },
    {
      "title": "oss-security (Oracle): 10.08.0 fixes five more CVEs; Upload2Shell page published 21 Nov",
      "url": "https://seclists.org/oss-sec/2026/q4/806",
      "date": "21 Nov"
    },
    {
      "title": "Paulos Yibelo on X: the file can arrive as an image or a video",
      "url": "https://x.com/PaulosYibelo/status/2124270467246969153",
      "date": "21 Nov"
    },
    {
      "title": "CVE record: CVE-2026-39919, JPEG 2000 heap overflow, fixed in 10.08.0",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-39919",
      "date": "15 Sep"
    },
    {
      "title": "BleepingComputer: CVE-2026-39919, Wordfence exploit unreliable, no attacks seen",
      "url": "https://www.bleepingcomputer.com/news/security/ghostscript-flaw-lets-hackers-hijack-servers-via-pdf-uploads/",
      "date": "13 Oct"
    },
    {
      "title": "Wordfence: CVE-2026-39919, two exploits tied to one Ghostscript build, 10.08.0 release candidate unfixed",
      "url": "https://www.wordfence.com/blog/2026/10/wordfence-argus-discovers-critical-vulnerability-in-ghostscript-the-program-that-turns-uploaded-pdfs-into-thumbnails-on-your-server/",
      "date": "12 Oct"
    },
    {
      "title": "Artifex: Ghostscript 10.08.0 release candidate 1",
      "url": "https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs10080rc1",
      "date": "18 Aug"
    }
  ],
  "changes": [
    {
      "date": "2026-11-22",
      "text": "Added a note on CVE-2026-39919, another Ghostscript bug the same update fixes, and a warning that the 10.08.0 release candidate isn't fixed."
    },
    {
      "date": "2026-11-22",
      "text": "Clearer that the crafted file can be uploaded as an image, or, the researcher says, a video. Notes the five other CVEs 10.08.0 fixes. The write-up is dated 17 Nov but first went public on 21 Nov, per oss-security."
    },
    {
      "date": "2026-11-22",
      "text": "Now says to update right away if outsiders' files reach Ghostscript: the public proof of concept and write-up cover most of an exploit, and the researchers say a full exploit comes next. Scare 2.9. Added what would make this Patch now."
    },
    {
      "date": "2026-11-22",
      "text": "Corrected: the researchers' write-up includes a downloadable proof-of-concept file (it takes control of memory but doesn't run commands by itself); we had said no exploit was public. Added Amazon Linux, SUSE Linux Enterprise 15 SP7 and 16, and openSUSE Leap 16, which have no fixed package yet, and Ubuntu's conflicting tracker status. Disclosure date set to 8 Sep, when the fix was released (the CVE record says 2 Sep, when the fix was written)."
    },
    {
      "date": "2026-11-22",
      "text": "Added WordPress to Safe versions."
    },
    {
      "date": "2026-11-22",
      "text": "Added Ghostscript to Safe versions."
    },
    {
      "date": "2026-11-22",
      "text": "Published."
    }
  ],
  "status": {
    "exploit": "public",
    "attacks": "none",
    "kev": null,
    "scare": 2.9
  },
  "status_cite": {
    "exploit": [
      3
    ],
    "attacks": [
      1,
      10
    ],
    "kev": [
      10
    ]
  },
  "safe_versions": [
    {
      "id": "ghostscript",
      "name": "Ghostscript",
      "url": "https://tldrcve.com/versions/ghostscript/",
      "json": "https://tldrcve.com/versions/ghostscript.json",
      "checked": "2026-11-22",
      "lines": [
        {
          "line": "10.08",
          "latest": "10.08.0",
          "released": "2026-09-08"
        }
      ],
      "older": "Artifex lists a single current release. Linux distros backport fixes into older versions (Debian 12's fixed package is still 10.0.0), so check your distro's advisory."
    },
    {
      "id": "wordpress",
      "name": "WordPress",
      "url": "https://tldrcve.com/versions/wordpress/",
      "json": "https://tldrcve.com/versions/wordpress.json",
      "checked": "2026-11-22",
      "lines": [
        {
          "line": "7.1",
          "latest": "7.1.5",
          "released": "2026-11-18"
        },
        {
          "line": "7.0",
          "latest": "7.0.9",
          "released": "2026-11-18"
        },
        {
          "line": "6.9",
          "latest": "6.9.12",
          "released": "2026-11-18"
        },
        {
          "line": "6.8",
          "latest": "6.8.13",
          "released": "2026-11-18"
        }
      ],
      "older": "Older branches back to 4.7 also get security releases (for example 6.7.12); 4.6 and older get none. Only the newest version is actively supported, and sites with automatic background updates on get these by themselves."
    }
  ]
}
