Fedora 43 shipped a Ghostscript security update addressing three 2026 vulnerabilities called out in the advisory: CVE-2026-112922, an out-of-bounds read in shade_next_color; CVE-2026-110133, a heap buffer overflow in the TrueType outliner; and CVE-2026-125396, arbitrary code execution through the SAFER sandbox. The source advisory is https://linuxsecurity.com/advisories/fedora/fedora-43-ghostscript-2026-112922.
This is not a theoretical printer bug. Ghostscript is embedded in document workflows that defenders often forget are attack surface: CUPS printing, cups-filters, ImageMagick and GraphicsMagick conversion, mail attachment scanning, OCR ingestion, thumbnail generation, LaTeX build pipelines, web upload handlers, and headless PDF or PostScript rendering services. A hostile .ps, .eps, .pdf, or font-bearing document can reach Ghostscript even when users never open a terminal. CVE-2026-125396 raises the urgency because it targets the SAFER boundary that many operators rely on as the last line of defense when processing untrusted input.
Treat this as a patch-now advisory for Fedora 43 systems that render, convert, print, scan, preview, or normalize documents. The provided summary does not state public CVSS scores, fixed package versions, in-the-wild exploitation, proof-of-concept availability, or CISA KEV inclusion; defenders should confirm those fields in Fedora Bodhi, NVD, and CISA KEV while still prioritizing remediation because arbitrary code execution through SAFER is a high-impact class of flaw.
Technical Analysis
Affected platform: Fedora 43 systems with the Ghostscript package installed, plus any service that bundles or invokes the system Ghostscript interpreter. Risk extends beyond desktop Linux. Server-side document pipelines are the main concern because they frequently run Ghostscript automatically against attacker-controlled files.
Relevant CVEs from the advisory:
- CVE-2026-112922: out-of-bounds read in Ghostscript shade_next_color. Primary impact is information disclosure or crash conditions from malformed shading or color data. Memory reads of this type can also become useful primitives when chained with allocator grooming or a stronger write primitive.
- CVE-2026-110133: heap buffer overflow in the Ghostscript TrueType outliner. This is the more classic memory-corruption path: a crafted font or font embedded inside a document reaches the TrueType outlining code and corrupts heap memory. Depending on build flags, heap layout, mitigations, and invocation context, this can move from denial of service to code execution.
- CVE-2026-125396: arbitrary code execution via SAFER. This is the critical defensive issue. Ghostscript SAFER mode is intended to restrict dangerous PostScript operators and file-system access. If SAFER can be bypassed, a malicious document may read or write files, invoke pipes, or execute commands in the security context of the Ghostscript process.
From a defender perspective, the likely attack chain is delivery of a crafted document to an automated consumer. Examples include a user printing a file, a web app converting an uploaded PDF to images, a mail gateway extracting attachments, a CMS generating previews, or a CI job building documentation. The file reaches gs directly or through a wrapper such as convert, magick, gsapi, cups-filters, ocrmypdf, unpaper, ps2pdf, pdf2ps, or a custom script. Exploitation requirements depend on the path: memory-corruption bugs usually require a malformed document parsed by the vulnerable component, while SAFER abuse requires reaching operators or parameters that escape the sandbox policy. Non-interactive invocation with -dSAFER is safer than unrestricted use, but CVE-2026-125396 means defenders must not treat -dSAFER as sufficient mitigation by itself.
Exploitation status based only on the supplied summary: fixed in a Fedora 43 update, no confirmed active exploitation, no named threat actor, no CISA KEV entry stated, and no public PoC stated. Do not interpret silence as low risk. Document interpreters are high-value targets because they provide repeatable parsing of untrusted content across many enterprise workflows.
Immediate scoping questions for your environment: Where does gs run? Which services call it? Do those services accept files from the internet, partners, customers, scanners, or email? Are containers or workers rebuilding images that embed Ghostscript? Are print servers exposed to broad internal networks? Are uploads converted before malware inspection? Those answers define blast radius.
Detection and Response
The best telemetry is process lineage. Look for gs or wrappers spawning shells, interpreters, downloaders, editors, or unexpected file tools. Also alert on command lines that weaken the sandbox, use pipe output, reference writable temp paths, or touch credential and configuration locations. Tune rules to known document workers first, then expand.
---
title: Linux Ghostscript Spawned Shell Interpreter or Downloader
id: 8f8f5d21-6d0b-4c45-9c7a-1a2b3c4d5e6f
status: experimental
description: Detects gs or common Ghostscript wrappers spawning shells, interpreters, or network download tools after document processing.
references:
- https://linuxsecurity.com/advisories/fedora/fedora-43-ghostscript-2026-112922
- https://attack.mitre.org/techniques/T1059/
- https://attack.mitre.org/techniques/T1203/
author: Security Arsenal
date: 2026/01/15
tags:
- attack.execution
- attack.t1059
- attack.t1203
logsource:
category: process_creation
product: linux
detection:
selection_parent:
ParentImage|endswith:
- /gs
- /convert
- /magick
- /gsapi
- /cups-filters
- /ocrmypdf
selection_child:
Image|endswith:
- /sh
- /bash
- /dash
- /zsh
- /python
- /python3
- /perl
- /ruby
- /curl
- /wget
- /nc
- /ncat
- /base64
condition: selection_parent and selection_child
falsepositives:
- Legitimate document build jobs that call shell wrappers
- Rare OCR or print pipelines with scripted post-processing
level: high
---
title: Ghostscript Sandbox Weakening or Pipe Output in Command Line
id: 3c9a5b70-2f4d-4c8d-a9a7-0b1c2d3e4f50
status: experimental
description: Detects Ghostscript invocations using sandbox weakening flags or pipe-style output that can turn document rendering into command execution.
references:
- https://linuxsecurity.com/advisories/fedora/fedora-43-ghostscript-2026-112922
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/01/15
tags:
- attack.defense_evasion
- attack.execution
- attack.t1059
logsource:
category: process_creation
product: linux
detection:
selection_gs:
CommandLine|contains:
- gs
- ghostscript
selection_risk:
CommandLine|contains:
- -dNOSAFER
- -dDELAYSAFER
- -dWRITESYSTEMDICT
- %pipe%
- OutputFile=|
- -sOutputFile=|
condition: selection_gs and selection_risk
falsepositives:
- Legacy internal conversion scripts
- Administrative debugging of PostScript workflows
level: high
---
title: Ghostscript Access to Sensitive Linux Paths
id: b37b9b60-7305-4d1b-a8bf-6a7b8c9d0e1f
status: experimental
description: Detects Ghostscript or wrappers reading sensitive authentication, key, or configuration paths during rendering.
references:
- https://linuxsecurity.com/advisories/fedora/fedora-43-ghostscript-2026-112922
- https://attack.mitre.org/techniques/T1003/
- https://attack.mitre.org/techniques/T1552/
author: Security Arsenal
date: 2026/01/15
tags:
- attack.credential_access
- attack.t1003
- attack.t1552
logsource:
category: file_event
product: linux
detection:
selection_proc:
Image|endswith:
- /gs
- /convert
- /magick
selection_path:
TargetFilename|startswith:
- /etc/shadow
- /etc/sudoers
- /root/.ssh
- /home/
TargetFilename|contains:
- /.ssh/id_
- /.aws/credentials
- /.config/gcloud
- /kubeconfig
condition: selection_proc and selection_path
falsepositives:
- Overbroad home directory processing jobs
- Backup or indexing tools incorrectly matched by wrapper names
level: medium
let Lookback = 7d;
let GsProcs = dynamic(['gs','ghostscript','convert','magick','gsapi','ocrmypdf']);
let RiskChildren = dynamic(['sh','bash','dash','zsh','python','python3','perl','ruby','curl','wget','nc','ncat','base64']);
DeviceProcessEvents
| where TimeGenerated >= ago(Lookback)
| where FileName in~ (GsProcs) or ProcessCommandLine has_any ('ghostscript',' -dSAFER',' -dNOSAFER','%pipe%','OutputFile=|')
| extend ChildShell = iff(FileName in~ (RiskChildren) or ProcessCommandLine has_any (RiskChildren), true, false)
| extend SandboxWeak = iff(ProcessCommandLine has_any ('-dNOSAFER','-dDELAYSAFER','-dWRITESYSTEMDICT','%pipe%','OutputFile=|'), true, false)
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, ChildShell, SandboxWeak, ReportId
| order by TimeGenerated desc;
-- Hunt Linux endpoints for Ghostscript executions with risky children or sandbox weakening
LET risky = 'sh|bash|dash|zsh|python|python3|perl|ruby|curl|wget|nc|ncat|base64'
SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ 'ghostscript|/gs|convert|magick|ocrmypdf'
AND (CommandLine =~ '-dNOSAFER|-dDELAYSAFER|-dWRITESYSTEMDICT|%pipe%|OutputFile=|'
OR CommandLine =~ risky)
#!/usr/bin/env bash
set -euo pipefail
# Patch Fedora 43 Ghostscript and identify services still exposing the interpreter.
sudo dnf clean expire-cache
sudo dnf -y update ghostscript
rpm -q ghostscript
# Confirm the running binary matches the installed package and list active consumers.
command -v gs || true
gs --version || true
sudo lsof -c gs -c convert -c magick -c ocrmypdf 2>/dev/null || true
ps -eo pid,ppid,comm,args | grep -E '(^|[/ ])(gs|ghostscript|convert|magick|ocrmypdf)([ ]|$)' || true
# Restart common document and print services so the patched library is loaded.
for svc in cups cups-browsed; do
if systemctl list-unit-files | grep -q "^${svc}.service"; then
sudo systemctl try-restart "${svc}.service" || true
fi
done
# Locate wrappers that invoke Ghostscript with unsafe flags.
sudo grep -RInE -- '-dNOSAFER|-dDELAYSAFER|-dWRITESYSTEMDICT|%pipe%|OutputFile=|' /etc /usr/local /opt /srv 2>/dev/null || true
# If ImageMagick is present, review policy before restricting PS and PDF coders.
for p in /etc/ImageMagick-6/policy.xml /etc/ImageMagick-7/policy.xml /usr/local/etc/ImageMagick-7/policy.xml; do
if [ -f "$p" ]; then
echo "Review policy: $p"
grep -nE 'coder|delegate|PS|PDF|EPS' "$p" || true
fi
done
# Validation idea for a sacrificial file only: run with SAFER and no display in a locked-down container or VM.
# gs -dSAFER -dBATCH -dNOPAUSE -dQUIET -sDEVICE=nullpage /path/to/sample.pdf
Remediation
- Patch Fedora 43 immediately: run sudo dnf update ghostscript and reboot or restart every service that loads the interpreter. The advisory summary does not publish the exact fixed NEVRA, so verify the installed build against the Fedora update and Bodhi advisory rather than assuming a version string from memory.
- Inventory every path to Ghostscript. Check packages with rpm -q ghostscript, containers and golden images, app bundles, print queues, mail security tools, web upload converters, CI builders, and document-management integrations. Patch the package inside images, not only on hosts.
- Reduce untrusted parsing. Block or quarantine inbound .ps, .eps, .ai, and high-risk PDF or font-bearing files where business use is low. If PDF must be accepted, process it in a disposable container or VM with no network egress, read-only input, non-root user, CPU and memory limits, seccomp, and no persistent credentials.
- Enforce safer invocation as defense in depth, not as a fix: use -dSAFER, -dBATCH, -dNOPAUSE, and least-privilege users; remove -dNOSAFER, -dDELAYSAFER, writable system dictionaries, pipe output, and broad file permissions from scripts. Because CVE-2026-125396 concerns SAFER itself, configuration alone must not delay patching.
- Constrain ImageMagick and similar wrappers. If business impact allows, set policy to disable PS, EPS, and PDF coders or route them to an isolated worker. Test before broad enforcement because PDF workflows may break.
- Add detections above to document servers, print servers, mail gateways, and build runners. Hunt for gs children, sandbox weakening flags, sensitive path reads, and unexpected network connections from document workers.
- Validate with change control: render a known-good corpus, run a sacrificial sample in isolation, monitor for crashes and child processes, and confirm service restarts loaded the patched library. Preserve volatile evidence first if you find suspicious gs lineage: process list, command lines, open files, package versions, uploaded file hashes, and service logs.
- Track closure in vulnerability management: mark Fedora 43 Ghostscript assets remediated only after package version, service restart, image rebuild, and detection deployment are verified.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.