Cloudanix VulnDB

CVE-2023-38559

Medium · 5.5

CVSS

5.5

EPSS

0.4%

Published

Aug 1, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a PDF processing tool can let a specially made file crash the program when opened, interrupting work that depends on converting or viewing PDFs.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Application
Class
Buffer Overflow
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Buffer overflow in devn_pcx_write_rle() within base/gdevdevn.c allows crafted PDF input processed by a DEVN device to trigger memory corruption and application crash.

Why it matters to the business

Organizations relying on Ghostscript for PDF rendering or conversion may experience sudden service interruptions and require manual restarts when processing untrusted files.

How an attack unfolds

An attacker prepares a malicious PDF targeting the DEVN device path, causes the victim to invoke Ghostscript on the file, and the overflow in the RLE write routine leads to denial of service.

How to fix it

Upgrade Ghostscript to a version containing the fix for the buffer overflow in devn_pcx_write_rle(); apply vendor patches for affected distributions of Red Hat Enterprise Linux, Fedora, and Debian.

How to confirm the fix worked

Confirm Ghostscript version is newer than the vulnerable release; test processing of known-malformed DEVN-targeted PDFs in a controlled environment and verify absence of crashes.

Typical attack path

  1. Craft malicious PDF exploiting DEVN device handling
  2. Deliver file to target environment
  3. Trigger Ghostscript processing of the PDF
  4. Trigger buffer overflow resulting in crash

How to detect it

Review system and application logs for Ghostscript segmentation faults or abnormal exits when handling PDF files; correlate with file creation or download events involving untrusted PDFs.

What your security team should do

  • Prioritize patching Ghostscript across all systems that process untrusted PDFs
  • Restrict use of DEVN device output in automated pipelines until updated
  • Monitor for Ghostscript process crashes in logging systems

The record

A buffer overflow flaw was found in base/gdevdevn.c:1973 in devn_pcx_write_rle() in ghostscript. This issue may allow a local attacker to cause a denial of service via outputting a crafted PDF file for a DEVN device with gs.

Affected packages

Ecosystem Package Introduced Fixed
AlmaLinux:8 ghostscript 0 9.27-11.el8
AlmaLinux:8 ghostscript-doc 0 9.27-11.el8
AlmaLinux:8 ghostscript-tools-dvipdf 0 9.27-11.el8
AlmaLinux:8 ghostscript-tools-fonts 0 9.27-11.el8
AlmaLinux:8 ghostscript-tools-printing 0 9.27-11.el8
AlmaLinux:8 ghostscript-x11 0 9.27-11.el8
AlmaLinux:8 libgs 0 9.27-11.el8
AlmaLinux:8 libgs-devel 0 9.27-11.el8
AlmaLinux:9 ghostscript 0 9.54.0-13.el9
AlmaLinux:9 ghostscript-doc 0 9.54.0-13.el9
AlmaLinux:9 ghostscript-tools-dvipdf 0 9.54.0-13.el9
AlmaLinux:9 ghostscript-tools-fonts 0 9.54.0-13.el9
AlmaLinux:9 ghostscript-tools-printing 0 9.54.0-13.el9
AlmaLinux:9 ghostscript-x11 0 9.54.0-13.el9
AlmaLinux:9 libgs 0 9.54.0-13.el9
AlmaLinux:9 libgs-devel 0 9.54.0-13.el9
Chainguard ghostscript 0 10.03.0-r0
Chainguard ghostscript-dbg 0 10.03.0-r0
Chainguard ghostscript-dev 0 10.03.0-r0
Chainguard ghostscript-doc 0 10.03.0-r0
Debian:10 ghostscript 0 9.27~dfsg-2+deb10u8
Debian:11 ghostscript 0 9.53.3~dfsg-7+deb11u6
Debian:12 ghostscript 0 10.0.0~dfsg-11+deb12u2
Debian:13 ghostscript 0 10.02.0~dfsg-1
Debian:14 ghostscript 0 10.02.0~dfsg-1
Mageia:8 ghostscript 0 9.53.3-2.6.mga8
Mageia:9 ghostscript 0 10.00.0-6.2.mga9
Red Hat:enterprise_linux:8::appstream ghostscript 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-debugsource 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-doc 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-gtk-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-tools-dvipdf 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-tools-fonts 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-tools-printing 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-x11 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream ghostscript-x11-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream libgs 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream libgs-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::appstream libgs-devel 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-debugsource 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-doc 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-gtk-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-tools-dvipdf 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-tools-fonts 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-tools-printing 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-x11 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb ghostscript-x11-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb libgs 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb libgs-debuginfo 0 0:9.27-11.el8
Red Hat:enterprise_linux:8::crb libgs-devel 0 0:9.27-11.el8
Red Hat:enterprise_linux:9::appstream ghostscript 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-debugsource 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-doc 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-gtk-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-tools-dvipdf 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-tools-fonts 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-tools-printing 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-x11 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream ghostscript-x11-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream libgs 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream libgs-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::appstream libgs-devel 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-debugsource 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-doc 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-gtk-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-tools-dvipdf 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-tools-fonts 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-tools-printing 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-x11 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb ghostscript-x11-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb libgs 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb libgs-debuginfo 0 0:9.54.0-13.el9
Red Hat:enterprise_linux:9::crb libgs-devel 0 0:9.54.0-13.el9
SUSE:Linux Enterprise Module for Basesystem 15 SP4 ghostscript 0 9.52-150000.170.1
SUSE:Linux Enterprise Module for Basesystem 15 SP5 ghostscript 0 9.52-150000.170.1
SUSE:Linux Enterprise Server 12 SP5 ghostscript 0 9.52-23.57.1
SUSE:Linux Enterprise Server for SAP Applications 12 SP5 ghostscript 0 9.52-23.57.1
SUSE:Linux Enterprise Software Development Kit 12 SP5 ghostscript 0 9.52-23.57.1
SUSE:Manager Proxy 4.2 ghostscript 0 9.52-150000.170.1
SUSE:Manager Server 4.2 ghostscript 0 9.52-150000.170.1
Ubuntu:20.04:LTS ghostscript 0 9.50~dfsg-5ubuntu4.9
Ubuntu:22.04:LTS ghostscript 0 9.55.0~dfsg1-0ubuntu5.4
Ubuntu:Pro:16.04:LTS ghostscript 0 9.26~dfsg+0-0ubuntu0.16.04.14+esm6
Ubuntu:Pro:18.04:LTS ghostscript 0 9.26~dfsg+0-0ubuntu0.18.04.18+esm1
Wolfi ghostscript 0 10.03.0-r0
Wolfi ghostscript-dbg 0 10.03.0-r0
Wolfi ghostscript-dev 0 10.03.0-r0
Wolfi ghostscript-doc 0 10.03.0-r0
openSUSE:Leap 15.4 ghostscript 0 9.52-150000.170.1
openSUSE:Leap 15.5 ghostscript 0 9.52-150000.170.1
openSUSE:Tumbleweed ghostscript 0 9.56.1-5.1

Related vulnerabilities