{"id":4526,"date":"2026-11-23T06:37:12","date_gmt":"2026-11-23T14:37:12","guid":{"rendered":"https:\/\/cyber.mag212.com\/ghostscript-upload2shell-cve-2026-125396-explained\/"},"modified":"2026-11-23T06:37:12","modified_gmt":"2026-11-23T14:37:12","slug":"ghostscript-upload2shell-cve-2026-125396-explained","status":"publish","type":"post","link":"https:\/\/cyber.mag212.com\/fr\/ghostscript-upload2shell-cve-2026-125396-explained\/","title":{"rendered":"How a File Upload Becomes a Shell: A Plain-English Guide to Ghostscript&#8217;s Upload2Shell Flaw (CVE-2026-125396)"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><strong>What Ghostscript is, why a PDF or image can carry an attack, and the five checks every team that accepts uploads should run this week<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>De la part de <a href=\"https:\/\/cyber.mag212.com\/fr\/one-upload-one-shell-mag212-cyber-daily-november-23-2026\/\">MAG212 CYBER Daily, 23 November 2026<\/a>. This article was written with AI assistance and edited by El Mostafa Ouchen. Commands, where included, are generic and were <strong>non test\u00e9 par MAG212<\/strong>; run them only on systems you are authorised to administer.<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/ghostscript-23nov-hero.jpg\" alt=\"How a file upload becomes a shell: diagram by MAG212 CYBER\" class=\"wp-image-4521\" srcset=\"https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/ghostscript-23nov-hero.jpg 1200w, https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/ghostscript-23nov-hero-300x169.jpg 300w, https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/ghostscript-23nov-hero-1024x576.jpg 1024w, https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/ghostscript-23nov-hero-768x432.jpg 768w, https:\/\/cyber.mag212.com\/wp-content\/uploads\/2026\/11\/ghostscript-23nov-hero-18x10.jpg 18w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption class=\"wp-element-caption\">Diagram: MAG212 CYBER, from the 23 November 2026 daily.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What you will learn<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>What Ghostscript is and why so many apps run it without you noticing<\/li>\n\n<li>What a &#8220;use-after-free&#8221; and a &#8220;sandbox escape&#8221; mean, in plain words<\/li>\n\n<li>How researchers turned one bug into a shell through uploads, email previews and printers<\/li>\n\n<li>How to check whether you are exposed, and what to fix first<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">The short version<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Researchers at pwn.ai published a write-up on 21 November 2026 called &#8220;Upload2Shell&#8221;. It describes CVE-2026-125396, a memory bug in Ghostscript&#8217;s Type 1 font loader. A crafted file can use it to switch off Ghostscript&#8217;s safety sandbox (the <code data-no-translation=\"\">-dSAFER<\/code> mode) and then run commands on the server. The flaw is fixed in <strong>Ghostscript 10.08.0<\/strong>, released on 8 September 2026. <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The public proof of concept only changes memory; it does not run shell commands. No exploitation in the wild has been reported, and the flaw is not in CISA&#8217;s Known Exploited Vulnerabilities list as of 23 November. That is the good news. The bad news is that several enterprise Linux distributions were still unpatched in mid-November. <a href=\"https:\/\/thehackernews.com\/2026\/11\/researchers-demonstrate-ghostscript.html\" rel=\"noopener\" target=\"_blank\">Les actualit\u00e9s des hackers<\/a>, <a href=\"https:\/\/www.itnews.com.au\/news\/ai-found-ghostscript-flaw-turned-file-uploads-into-remote-code-execution-630512\" rel=\"noopener\" target=\"_blank\">iTnews<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lesson 1: Ghostscript is everywhere, and usually invisible<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ghostscript is an interpreter for PostScript and PDF. You may never run it yourself, but lots of software calls it behind the scenes whenever it needs to turn a PDF, EPS or PostScript file into an image: to draw a thumbnail, show a preview, convert a document or prepare a print job.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The pwn.ai team listed paths through webmail (Roundcube builds a thumbnail when a message is viewed, so no click on the attachment is needed), WordPress uploads, form plugins that accept PDFs, wikis and document managers, a Debian print server, and Python and PHP imaging libraries such as Pillow and Imagick. They also say they sent a harmless proof to Google services, which closed that path on 10 November. <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The lesson:<\/strong> your attack surface includes every library your app loads, not only the code you wrote. If your product accepts a file and shows a preview, ask what draws that preview.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lesson 2: Two terms worth understanding<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Sandbox (<code data-no-translation=\"\">-dSAFER<\/code>).<\/strong> PostScript is a full programming language, so a &#8220;document&#8221; is really a small program. Ghostscript&#8217;s SAFER mode is meant to stop that program from opening or writing arbitrary files. Apps rely on it to handle untrusted files safely.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Use-after-free.<\/strong> A program frees a piece of memory but keeps a pointer to it. If an attacker can get new data placed in that freed spot, the program later trusts data the attacker controls. According to pwn.ai, a privileged helper inside Ghostscript could be tricked into leaving such a dangling reference; the researchers turned it into the ability to write to memory, used that to switch off the SAFER file check, and then ran commands. <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Artifex developer Ken Sharp described the step involved as old code that is known to be risky and hard to remove; Artifex is moving it into safer code. <a href=\"https:\/\/thehackernews.com\/2026\/11\/researchers-demonstrate-ghostscript.html\" rel=\"noopener\" target=\"_blank\">Les actualit\u00e9s des hackers<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The lesson:<\/strong> a sandbox inside a process is one layer, not a wall. If the process itself is compromised, the sandbox can be switched off from the inside.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lesson 3: &#8220;Local&#8221; in a score does not mean &#8220;safe from the internet&#8221;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The flaw carries a CVSS 4.0 score of 8.5 with a <em>local<\/em> attack vector. Yet every path the researchers showed was reachable remotely: an upload form, an email, a shared print queue. <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The lesson (MAG212 analysis):<\/strong> if your patch queue is sorted only by CVSS vector, this one may sit lower than it should. Ask how attacker-controlled files reach the vulnerable component, not just what the score says.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lesson 4: Version numbers can lie<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Distributions often backport fixes and keep the old version string, so <code data-no-translation=\"\">gs --version<\/code> alone can mislead you in both directions, iTnews warns. <a href=\"https:\/\/www.itnews.com.au\/news\/ai-found-ghostscript-flaw-turned-file-uploads-into-remote-code-execution-630512\" rel=\"noopener\" target=\"_blank\">iTnews<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In pwn.ai&#8217;s snapshot from 11\u201312 November:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Fixed:<\/strong> Debian 13 (DSA-6516-1), Ubuntu (USN-8949-1), and 10.08.0 in Arch, Fedora Rawhide, Alpine, openSUSE Tumbleweed and Homebrew.<\/li>\n\n<li><strong>Still open:<\/strong> Debian 12, Amazon Linux 2 \/ 2023 (&#8220;pending fix&#8221;), several SUSE Enterprise lines and openSUSE Leap 16.<\/li>\n\n<li><strong>Not checked by the researchers:<\/strong> RHEL, Rocky, AlmaLinux, Oracle Linux and stable Fedora.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">That snapshot is now more than ten days old, so check your vendor&#8217;s tracker for the current status. <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Your five-step checklist<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Find every Ghostscript.<\/strong> Hosts, containers, app bundles and appliances. Image libraries often call a bundled or system copy.<\/li>\n\n<li><strong>Update to 10.08.0 or your vendor&#8217;s backport,<\/strong> then restart the services that load it. Confirm with your distribution&#8217;s security tracker rather than the version string alone.<\/li>\n\n<li><strong>Lock down print queues.<\/strong> Require authentication on shared IPP\/CUPS queues and keep them off untrusted networks.<\/li>\n\n<li><strong>Check file types before you render.<\/strong> Validate the real file type (not the extension) before you generate a preview or thumbnail, and refuse PostScript and EPS where you do not need them.<\/li>\n\n<li><strong>Confine the renderer.<\/strong> Run conversion in a separate, unprivileged process or container that cannot start a shell. In one test, an AppArmor profile blocked the shell. Do not rely on <code data-no-translation=\"\">-dSAFER<\/code> alone. <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress site owners: WordPress 7.0.4 (and 6.9.7 with backports) closed WordPress&#8217;s own upload path, which was tracked separately as CVE-2026-65640. That fix does not replace updating Ghostscript on the server. <a href=\"https:\/\/thehackernews.com\/2026\/11\/researchers-demonstrate-ghostscript.html\" rel=\"noopener\" target=\"_blank\">Les actualit\u00e9s des hackers<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A read-only starting point for an inventory (generic, <strong>non test\u00e9 par MAG212<\/strong>; run it only on systems you administer):<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code data-no-translation=\"\">gs --version\ndpkg -l | grep -i ghostscript     # Debian\/Ubuntu\nrpm -qa | grep -i ghostscript     # RHEL\/SUSE\/Amazon Linux<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Do not confuse it with CVE-2026-39919<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A different Ghostscript heap overflow, CVE-2026-39919, was reported in October. It affects 9.21 to 10.07.1 and is also fixed in 10.08.0. Same fix, different bug. <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/ghostscript-flaw-lets-hackers-hijack-servers-via-pdf-uploads\/\" rel=\"noopener\" target=\"_blank\">BleepingComputer<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Points cl\u00e9s \u00e0 retenir<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A file is input to a program, and sometimes it is a program.<\/li>\n\n<li>Inventory the libraries behind your previews, not just your own code.<\/li>\n\n<li>Patch to 10.08.0 or a verified backport, and confine the renderer as a second layer.<\/li>\n\n<li>Treat &#8220;local&#8221; CVSS scores with care when files arrive from the internet.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Sujets connexes sur MAG212 CYBER<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/cyber.mag212.com\/fr\/one-upload-one-shell-mag212-cyber-daily-november-23-2026\/\">MAG212 CYBER Daily, 23 November 2026: One upload, one shell<\/a> (num\u00e9ro complet et PDF)<\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/fr\/where-do-your-ai-prompts-go-ai-provider-leak-lessons\/\">Where do your AI prompts really go?<\/a><\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/fr\/webworm-softether-vpn-spy-bridge-how-to-detect\/\">No malware needed: Webworm\u2019s VPN spy bridge<\/a><\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/fr\/cisa-kev-list-explained-patch-prioritization-guide\/\">CISA\u2019s KEV list explained<\/a><\/li>\n\n<li><a href=\"https:\/\/cyber.mag212.com\/fr\/subscribe-free\/\">Abonnez-vous gratuitement \u00e0 MAG212 CYBER<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Sources<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>pwn.ai: <a href=\"https:\/\/pwn.ai\/upload2shell\/research.html\" rel=\"noopener\" target=\"_blank\">pwn.ai<\/a><\/li>\n\n<li>The Hacker News: <a href=\"https:\/\/thehackernews.com\/2026\/11\/researchers-demonstrate-ghostscript.html\" rel=\"noopener\" target=\"_blank\">thehackernews.com<\/a><\/li>\n\n<li>iTnews: <a href=\"https:\/\/www.itnews.com.au\/news\/ai-found-ghostscript-flaw-turned-file-uploads-into-remote-code-execution-630512\" rel=\"noopener\" target=\"_blank\">www.itnews.com.au<\/a><\/li>\n\n<li>BleepingComputer: <a href=\"https:\/\/www.bleepingcomputer.com\/news\/security\/ghostscript-flaw-lets-hackers-hijack-servers-via-pdf-uploads\/\" rel=\"noopener\" target=\"_blank\">www.bleepingcomputer.com<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Written and edited by El Mostafa Ouchen for MAG212 CYBER. Facts checked against the sources above as of 23 November 2026, 7:00 AM PT.<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>A plain-English guide to CVE-2026-125396: what Ghostscript is, how researchers turned uploads, mail previews and print jobs into shells, and the five checks every team that accepts files should run this week.<\/p>","protected":false},"author":1,"featured_media":4521,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,15],"tags":[566,574,565,160,567,175],"class_list":["post-4526","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-critical-cves","category-threat-intelligence","tag-cve-2026-125396","tag-file-upload-security","tag-ghostscript","tag-linux","tag-upload2shell","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts\/4526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/comments?post=4526"}],"version-history":[{"count":0,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/posts\/4526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/media\/4521"}],"wp:attachment":[{"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/media?parent=4526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/categories?post=4526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cyber.mag212.com\/fr\/wp-json\/wp\/v2\/tags?post=4526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}