CVE-2017-5951 in Ghostscriptinfo

Summary

by MITRE

The mem_get_bits_rectangle function in base/gdevmem.c in Artifex Software, Inc. Ghostscript 9.20 allows remote attackers to cause a denial of service (NULL pointer dereference and application crash) via a crafted file.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 08/25/2020

The vulnerability identified as CVE-2017-5951 resides within the Ghostscript document processing software developed by Artifex Software Inc. This issue affects version 9.20 and represents a critical denial of service weakness that can be exploited remotely through specially crafted input files. The affected component is the mem_get_bits_rectangle function located in the base/gdevmem.c source file, which forms part of Ghostscript's memory management and device handling subsystems. This function is responsible for processing bitmap data rectangles during document rendering operations, making it a crucial element in the software's ability to handle graphical content.

The technical flaw manifests as a NULL pointer dereference condition that occurs when the mem_get_bits_rectangle function processes malformed input data. When an attacker crafts a specially designed file containing malformed bitmap parameters, the function fails to properly validate incoming data structures before attempting to access memory locations. This validation failure results in the software attempting to dereference a NULL pointer, causing an immediate application crash and termination of the processing thread. The vulnerability demonstrates characteristics consistent with CWE-476, which specifically addresses NULL pointer dereference conditions that can lead to system instability and denial of service scenarios.

The operational impact of this vulnerability extends beyond simple application crashes to potentially disrupt legitimate document processing workflows in environments where Ghostscript serves as a core component. Organizations relying on Ghostscript for document conversion, printing, or rendering services face significant risk when exposed to untrusted input files. The remote exploitation capability means that adversaries can trigger this condition without physical access to systems, making it particularly dangerous in networked environments where document processing occurs automatically. This vulnerability affects both web applications and server environments that utilize Ghostscript for document handling, potentially leading to service disruption for multiple users or applications depending on the processing pipeline.

Mitigation strategies for CVE-2017-5951 should prioritize immediate software updates to versions that contain the patched mem_get_bits_rectangle function with proper input validation mechanisms. System administrators should implement strict file validation procedures before processing documents through Ghostscript, including content inspection and sandboxed execution environments. Network-based protections such as firewalls and intrusion detection systems can be configured to monitor for suspicious file types that might trigger this vulnerability. Additionally, organizations should consider implementing principle of least privilege controls to limit the exposure of Ghostscript components and establish monitoring protocols to detect unusual application termination events. The vulnerability aligns with ATT&CK technique T1499.004, which covers network denial of service attacks through application-level exploitation, emphasizing the need for comprehensive defensive measures that address both immediate patching requirements and broader security posture improvements.

Reservation

02/09/2017

Disclosure

04/03/2017

Moderation

accepted

Entry

VDB-99248

CPE

ready

EPSS

0.00355

KEV

no

Activities

very low

Sources

Want to stay up to date on a daily basis?

Enable the mail alert feature now!