{
  "id": 21148469,
  "title": "GhostScript CVE 2026-125396: \"Upload2Shell\"",
  "url": "https://urgent.news/2026/11/22/ghostscript-cve-2026-125396-upload2shell",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-22T00:52:23.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://pwn.ai/upload2shell/research.html"
  },
  "original_language": "en",
  "account": "Ghostscript has been hit with a critical security flaw affecting its Type 1 font loader. The vulnerability, tracked as CVE-2026-125396, enables attackers to execute arbitrary commands on the system, a technique dubbed \"Upload2Shell.\" This occurs due to a use-after-free bug that provides a write-what-where primitive, allowing attackers to manipulate memory locations and execute commands.\n\nThe issue stems from the .putgstringcopy function in Ghostscript's font handling code. This helper function, which deals with font dictionaries in PostScript, was intended to be read-only but ended up being executed during font loading operations. Attackers can craft a malicious document and upload it, triggering the vulnerable code path. This document can contain a PostScript file that leverages the .putgstringcopy function to write arbitrary data to protected memory areas, effectively bypassing Ghostscript's -dSAFER sandbox designed to restrict the functionality of untrusted code.\n\nThe exploit works by altering the interpreter's execution environment, allowing attackers to run commands with the privileges of the Ghostscript rendering process. This can lead to full system compromise, as the affected service account may have access to sensitive files and system resources. Notably, the vulnerability does not require an initial file upload to a server; a crafted file can be passed through any image-processing application that internally uses Ghostscript, such as PHP's ImageMagick bindings, Python's ImageIO, or Java's ImageIO.\n\nThe vulnerability was disclosed to Artifex, the maintainers of Ghostscript, and efforts are underway to patch the issue. However, due to the nature of PostScript's Turing-complete nature, the impact of this vulnerability is profound. It underscores the need for careful handling of file uploads and document rendering processes, as seemingly innocuous file formats like .pdf can be manipulated to execute malicious code.",
  "summary": "Here's the NVD page for the CVE with some additional useful context . Comments",
  "key_points": [
    "Critical Ghostscript flaw CVE-2026-125396 allows arbitrary command execution.",
    "\"Upload2Shell\" vulnerability stems from use-after-free bug in font loader.",
    "Attackers can exploit crafted PostScript documents to compromise systems."
  ],
  "editors_take": "The vulnerability turns seemingly harmless document processing into a direct pathway for system compromise by bypassing the established sandbox protections designed to isolate untrusted code.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}