The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2023-38559

CVE-2023-38559: Ghostscript Buffer Overflow Vulnerability

CVE-2023-38559 is a buffer overflow flaw in Artifex Ghostscript's devn_pcx_write_rle() function that enables local attackers to trigger denial of service. This article covers technical details, affected versions, and mitigation.

Published: February 4, 2026

CVE-2023-38559 Overview

A buffer overflow vulnerability has been identified in Artifex Ghostscript, a widely-used interpreter for PostScript and PDF files. The flaw exists in the devn_pcx_write_rle() function located in base/gdevdevn.c at line 1973. This vulnerability allows a local attacker to trigger a denial of service condition by crafting a malicious PDF file that targets a DEVN device when processed with Ghostscript (gs).

Ghostscript is commonly used in document processing workflows, print servers, and PDF conversion utilities across enterprise environments. The buffer overflow occurs during RLE (Run-Length Encoding) compression operations when handling specially crafted input, potentially causing application crashes and service disruptions.

Critical Impact

Local attackers can cause denial of service by supplying a crafted PDF file to Ghostscript, disrupting document processing workflows and print services.

Affected Products

  • Artifex Ghostscript (all versions prior to the security patch)
  • Red Hat Enterprise Linux 8.0 and 9.0
  • Fedora 37 and 38
  • Debian Linux 10.0

Discovery Timeline

  • 2023-08-01 - CVE-2023-38559 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-38559

Vulnerability Analysis

The vulnerability resides in the devn_pcx_write_rle() function within Ghostscript's device output handling code. This function is responsible for writing PCX image data using Run-Length Encoding compression when outputting to DEVN (device-independent color) devices.

The buffer overflow condition occurs when the function processes malformed or specially crafted input data that exceeds the expected buffer boundaries. The flaw is categorized under CWE-120 (Buffer Copy without Checking Size of Input) and CWE-125 (Out-of-Bounds Read), indicating that the vulnerable code fails to properly validate input size before performing memory operations.

When exploited, this vulnerability causes the Ghostscript process to crash, resulting in denial of service. While the attack requires local access and user interaction (opening a malicious PDF), it can be leveraged to disrupt automated document processing pipelines and print servers that rely on Ghostscript.

Root Cause

The root cause stems from insufficient bounds checking in the devn_pcx_write_rle() function at line 1973 of base/gdevdevn.c. During RLE compression of PCX output data, the function does not adequately validate the size of input data against the destination buffer capacity. This allows crafted PDF input to trigger memory operations that exceed buffer boundaries, leading to memory corruption and subsequent application crash.

Attack Vector

The attack requires local access to the target system and user interaction to process a malicious PDF file. An attacker would craft a PDF document with specific content designed to trigger the vulnerable code path when Ghostscript processes the file for a DEVN device output. The attack sequence involves:

  1. Creating a specially crafted PDF file with malicious content targeting the PCX RLE encoding routine
  2. Convincing a user or automated system to process the PDF using Ghostscript with a DEVN device
  3. The vulnerable function attempts to write RLE-encoded data, triggering the buffer overflow
  4. The application crashes, causing denial of service

The vulnerability affects systems where Ghostscript is used for document conversion, print processing, or automated PDF handling workflows.

Detection Methods for CVE-2023-38559

Indicators of Compromise

  • Unexpected Ghostscript (gs) process crashes during PDF processing operations
  • Core dump files generated by Ghostscript with stack traces pointing to gdevdevn.c or devn_pcx_write_rle()
  • Abnormal PDF files with unusual structure or embedded content targeting PCX output
  • System logs showing repeated segmentation faults in Ghostscript processes

Detection Strategies

  • Monitor for Ghostscript process crashes and segmentation faults in system logs
  • Implement file integrity monitoring on PDF files before processing with Ghostscript
  • Deploy endpoint detection rules to identify crash patterns consistent with buffer overflow exploitation
  • Audit document processing workflows for unusual PDF file submissions

Monitoring Recommendations

  • Enable crash reporting and core dump collection for Ghostscript processes
  • Configure centralized logging to capture Ghostscript execution errors across document processing infrastructure
  • Implement anomaly detection for PDF file characteristics in document upload systems
  • Monitor system resource utilization patterns that may indicate repeated crash-restart cycles

How to Mitigate CVE-2023-38559

Immediate Actions Required

  • Update Ghostscript to the latest patched version from your distribution's package repository
  • Apply vendor security patches from Red Hat, Fedora, or Debian as applicable to your environment
  • Review and restrict access to systems running Ghostscript document processing services
  • Implement input validation for PDF files before processing with Ghostscript

Patch Information

The vulnerability has been addressed by Artifex in commit d81b82c70bc1. Multiple Linux distributions have released security updates:

  • Red Hat Enterprise Linux: Patches available via RHSA-2023:6544 and RHSA-2023:7053
  • Fedora: Updates available through standard package repositories
  • Debian: Security advisory published in Debian LTS Announce August 2023

The official patch commit is available in the Ghostscript Git repository.

Workarounds

  • Isolate Ghostscript processing in sandboxed environments or containers with limited system access
  • Avoid processing untrusted PDF files with DEVN device outputs until patches are applied
  • Implement application-level input filtering to reject potentially malicious PDF structures
  • Consider using alternative PDF processing tools for critical workflows until the environment is fully patched
bash
# Update Ghostscript on Red Hat/CentOS/RHEL systems
sudo yum update ghostscript

# Update Ghostscript on Fedora systems
sudo dnf update ghostscript

# Update Ghostscript on Debian/Ubuntu systems
sudo apt-get update && sudo apt-get upgrade ghostscript

# Verify installed Ghostscript version
gs --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeBuffer Overflow

  • Vendor/TechArtifex Ghostscript

  • SeverityMEDIUM

  • CVSS Score5.5

  • EPSS Probability0.01%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-125

  • CWE-120
  • Technical References
  • Red Hat Security Advisory RHSA-2023:6544

  • Red Hat Security Advisory RHSA-2023:7053

  • Red Hat CVE Analysis CVE-2023-38559

  • Ghostscript Bug Report #706897

  • Red Hat Bugzilla Report #2224367

  • Debian LTS Announce August 2023

  • Fedora Package Announcement

  • Fedora Package Announcement
  • Vendor Resources
  • Ghostscript Git Commit d81b82c70bc1
  • Related CVEs
  • CVE-2025-27836: Artifex Ghostscript Buffer Overflow Flaw

  • CVE-2025-27832: Artifex Ghostscript Buffer Overflow Flaw

  • CVE-2025-27831: Ghostscript Buffer Overflow Vulnerability

  • CVE-2025-27833: Artifex Ghostscript Buffer Overflow Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English