---
title: 'Upload2Shell: Ghostscript font bug turns uploaded files into code execution (CVE-2026-125396)'
description: >-
  A use-after-free in Ghostscript's Type 1 font code (.putgstringcopy in gs_fonts.ps) lets a crafted
  PostScript or PDF file escape the -dSAFER sandbox and run...
url: https://expiredqueues.com/security-advisories/ghostscript-upload2shell-cve-2026-125396/
markdown: https://expiredqueues.com/security-advisories/ghostscript-upload2shell-cve-2026-125396/index.md
image: >-
  https://expiredqueues.com/images/og/security-advisories-ghostscript-upload2shell-cve-2026-125396-2d0f8cfe.jpg
---

[Security advisories](https://expiredqueues.com/security-advisories/index.md)

# Upload2Shell: Ghostscript font bug turns uploaded files into code execution (CVE-2026-125396)

First listed 23 November 2026 Updated 23 November 2026

Fix available

A use-after-free in Ghostscript's Type 1 font code (.putgstringcopy in gs\_fonts.ps) lets a crafted PostScript or PDF file escape the -dSAFER sandbox and run code. It affects Ghostscript before 10.08.0. Researchers at pwn.ai published Upload2Shell on 21 Nov 2026, showing that apps which pass uploaded files to ImageMagick or similar libraries hand them to Ghostscript, so a single upload can become remote code execution. Their tests list Roundcube 1.7.2, where an external sender needs no account and the recipient only has to view the message, given a permissive ImageMagick setup, and WordPress sites that use Imagick with Ghostscript, tracked separately as CVE-2026-65640. The researchers published a proof of concept that writes to memory; no attacks are reported. Ubuntu listed all its releases as needing evaluation on 18 Nov.

- Vendor

  Artifex

- Type

  Critical

- Status

  Fix available. No exploitation reported.

- CVE

  [CVE-2026-125396](https://www.cve.org/CVERecord?id=CVE-2026-125396), [CVE-2026-65640](https://www.cve.org/CVERecord?id=CVE-2026-65640)

- Tags

  ghostscript, imagemagick, roundcube, WordPress, PHP, Ubuntu, Debian

- History

  - 23 November 2026 First listed. Research published 21 Nov with a memory-write proof of concept. No attacks reported.

[Read the source](https://pwn.ai/upload2shell/research.html)

## More sources

- [ubuntu.com/security/CVE-2026-125396](https://ubuntu.com/security/CVE-2026-125396)
- [bugs.ghostscript.com/show\_bug.cgi?id=709684](https://bugs.ghostscript.com/show_bug.cgi?id=709684)

This is one entry in a list I pick by hand. It tells you whether a fix exists. For how to apply it, follow the source. [See all advisories](https://expiredqueues.com/security-advisories/index.md).

**Follow Expired Queues.** We are on X and Instagram.

[](https://x.com/expiredqueues "Expired Queues on X (@expiredqueues)")[](https://www.instagram.com/expiredqueues/ "Expired Queues on Instagram (@expiredqueues)")

## Structured data

```json
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Upload2Shell: Ghostscript font bug turns uploaded files into code execution (CVE-2026-125396)",
  "description": "A use-after-free in Ghostscript's Type 1 font code (.putgstringcopy in gs_fonts.ps) lets a crafted PostScript or PDF file escape the -dSAFER sandbox and run code. It affects Ghostscript before 10.08.0. Researchers at pwn.ai published Upload2Shell on 21 Nov 2026, showing that apps which pass uploaded files to ImageMagick or similar libraries hand them to Ghostscript, so a single upload can become remote code execution. Their tests list Roundcube 1.7.2, where an external sender needs no account and the recipient only has to view the message, given a permissive ImageMagick setup, and WordPress sites that use Imagick with Ghostscript, tracked separately as CVE-2026-65640. The researchers published a proof of concept that writes to memory; no attacks are reported. Ubuntu listed all its releases as needing evaluation on 18 Nov.",
  "datePublished": "2026-11-23",
  "dateModified": "2026-11-23",
  "author": {
    "@type": "Person",
    "name": "Adrian Noel",
    "url": "https://expiredqueues.com/about/"
  },
  "publisher": {
    "@type": "Person",
    "name": "Adrian Noel"
  },
  "mainEntityOfPage": "https://expiredqueues.com/security-advisories/ghostscript-upload2shell-cve-2026-125396/",
  "isPartOf": {
    "@type": "CollectionPage",
    "@id": "https://expiredqueues.com/security-advisories/"
  },
  "about": "Artifex",
  "keywords": "CVE-2026-125396, CVE-2026-65640",
  "citation": "https://pwn.ai/upload2shell/research.html"
}
```
