CVE-2019-14812: High severity Artifex Ghostscript vulnerability

Published Aug 20, 2019
·
Updated

A flaw was found in all ghostscript versions 9.x before 9.50, in the .setuserparams2 procedure where it did not properly secure its privileged calls, enabling scripts to bypass -dSAFER restrictions. A specially crafted PostScript file could disable security protection and then have access to the file system, or execute arbitrary commands.

Other sources

In Ghostscript 9.27, some ephemeral routines in .setuserparams2 can expose .forceput operator when hooking errors. This issue is similar to upstream bug https://bugs.ghostscript.com/showbug.cgi?id=700317.

The actual root-cause is in .setuserparams2 however there is no direct path to invoke the operator.

http://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=Resource/Init/gslev2.ps;h=98d55fe74251e2b8f384a0a97d0a92a9f88949b6;hb=ebfaa2db4cb518a2bc99c1532d4429201a13dfab#l156

156 /userparams .systemvar 3 1 roll .forceput % userparams is read-only 157 } executeonly 158 { 159 pop pop 160 } ifelse 161 } forall

We can reach .setuserparams2 via setuserparams.

http://git.ghostscript.com/?p=ghostpdl.git;a=blob;f=Resource/Init/gslev2.ps;h=98d55fe74251e2b8f384a0a97d0a92a9f88949b6;hb=ebfaa2db4cb518a2bc99c1532d4429201a13dfab#l169

169 /setuserparams { % <dict> setuserparams - 170 {.setuserparams2} stopped 171 {/setuserparams load $error /errorname get signalerror} if 172 } .bind odef

This can be used to disable -dSAFER and, for example, access files outside of the restricted area, or command execution.

Reference: https://bugs.ghostscript.com/showbug.cgi?id=701444

— Red Hat

Affected Software

22 affected componentsFixes available
debian/ghostscript
9.27~dfsg-2+deb10u59.27~dfsg-2+deb10u99.53.3~dfsg-7+deb11u69.53.3~dfsg-7+deb11u510.0.0~dfsg-11+deb12u210.0.0~dfsg-11+deb12u110.02.0~dfsg-2
Artifex Ghostscript>=9.00<9.50
Fedoraproject Fedora=31
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.27-r3
9.27-r3
alpine/ghostscript>=9.00<9.26-r4
9.26-r4
alpine/ghostscript>=9.00<9.26-r4
9.26-r4
alpine/ghostscript>=9.00<9.26-r4
9.26-r4
redhat/ghostscript<9.50
9.50

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/ghostscript to a version that resolves this vulnerability.

    Fixed in 9.27~dfsg-2+deb10u5Fixed in 9.27~dfsg-2+deb10u9Fixed in 9.53.3~dfsg-7+deb11u6Fixed in 9.53.3~dfsg-7+deb11u5Fixed in 10.0.0~dfsg-11+deb12u2Fixed in 10.0.0~dfsg-11+deb12u1Fixed in 10.02.0~dfsg-2
  2. Upgrade

    Upgrade alpine/ghostscript to a version that resolves this vulnerability.

    Fixed in 9.27-r3
  3. Upgrade

    Upgrade alpine/ghostscript to a version that resolves this vulnerability.

    Fixed in 9.26-r4
  4. Upgrade

    Upgrade redhat/ghostscript to a version that resolves this vulnerability.

    Fixed in 9.50
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 9.50

Event History

Aug 20, 2019
Data Sourced
via Red Hat·03:39 PM
DescriptionSeverityAffected Software
Nov 27, 2019
CVE Published
via MITRE·01:50 PM
Data Sourced
via MITRE·01:50 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:15 PM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·02:15 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the vulnerability ID for this flaw?

The vulnerability ID for this flaw is CVE-2019-14812.

2

What is the severity of CVE-2019-14812?

The severity of CVE-2019-14812 is high, with a severity value of 7.8.

3

Which versions of ghostscript are affected by CVE-2019-14812?

All ghostscript versions 9.x before 9.50 are affected by CVE-2019-14812.

4

How can an attacker exploit CVE-2019-14812?

An attacker can exploit CVE-2019-14812 by using a specially crafted PostScript file to disable security protection and gain unauthorized access.

5

Is there a fix available for CVE-2019-14812?

Yes, a fix is available for CVE-2019-14812. It is recommended to update to ghostscript version 9.50 or later.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203