Ghostscript -dSAFER Sandbox Bypass Vulnerability (CVE-2019-10216) Threat Alert

Ghostscript -dSAFER Sandbox Bypass Vulnerability (CVE-2019-10216) Threat Alert

August 30, 2019 | Mina Hao

Overview

Recently, Ghostscript announced the discovery of the -dSAFER sandbox bypass vulnerability (CVE-2019-10216). The .buildfont1 procedure in Ghostscript does not properly restrict privileged calls, which allows attackers to escalate privileges and access files beyond the restricted domain.

Reference:

https://seclists.org/bugtraq/2019/Aug/16

NSFOCUS’s Alert Level: [Blue]

For the definition of NSFOCUS’s alert levels, see “Description of NSFOCUS’s Security Alert Levels.”

Affected Versions

Ghostscript before commit 5b85ddd19a8420a1bd2d5529325be35d78e94234

http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=5b85ddd19

Unaffected Versions

Ghostscript commit 5b85ddd19a8420a1bd2d5529325be35d78e94234 and later

Solution

Currently, Ghostscript has not released new versions to fix this vulnerability, but this vulnerability has been fixed in Ghostscript commit 5b85ddd19a8420a1bd2d5529325be35d78e94234 and later versions. Users are advised to upgrade as soon as possible to protect against this vulnerability.

Mitigation:

Users can protect against this vulnerability by disabling PS, EPS, PDF and XPS coders in policy.xml. Take ImageMagick as an example. Users can modify the policy configuration file of ImageMagick by adding the following code to <policymap> in its default path, /etc/ImageMagick/policy.xml.

<policymap>

<policy domain=”coder” rights=”none” pattern=”PS” />

<policy domain=”coder” rights=”none” pattern=”EPS” />

<policy domain=”coder” rights=”none” pattern=”PDF” />

<policy domain=”coder” rights=”none” pattern=”XPS” />

</policymap>

Description of NSFOCUS’s Security Alert Levels

Level Description Delivery of Technical Analysis Result Availability of Detection & Protection Rule Update
Red The vulnerability has an extensive and damaging impact, and is easy to exploit. Within 12 hours Within 16 hours
Orange The vulnerability has a comparatively extensive and damaging impact, and is comparatively easy to exploit. Within 12 hours Within 16 hours
Yellow The vulnerability has a controllable impact within a controllable scope, and is difficult to exploit. Within 12 hours Within 16 hours
Blue The vulnerability has a minor impact within a small scope, and is very difficult to exploit. On a weekly routine

Statement

This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.

About NSFOCUS

NSFOCUS, Inc., a global network and cyber security leader, protects enterprises and carriers from advanced cyber attacks. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide multi-layered, unified and dynamic protection against advanced cyber attacks.

NSFOCUS works with Fortune Global 500 companies, including four of the world’s five largest financial institutions, organizations in insurance, retail, healthcare, critical infrastructure industries as well as government agencies. NSFOCUS has technology and channel partners in more than 60 countries, is a member of both the Microsoft Active Protections Program (MAPP), and the Cloud Security Alliance (CSA).

A wholly owned subsidiary of NSFOCUS Information Technology Co. Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.