cbcvebase.
CVE-2019-6116
published 2019-03-21

CVE-2019-6116: In Artifex Ghostscript through 9.26, ephemeral or transient procedures can allow access to system operators, leading to remote code execution.

PriorityP263high7.8CVSS 3.1
AVLACLPRNUIRSUCHIHAH
EXPLOIT
EPSS
40.80%
98.5th percentile
In Artifex Ghostscript through 9.26, ephemeral or transient procedures can allow access to system operators, leading to remote code execution.

Affected

34 ranges· showing 25
VendorProductVersion rangeFixed in
artifexghostscript< 9.279.27
artifexghostscript<= 9.26
artifexghostscript>= 0 < 9.26a~dfsg-19.26a~dfsg-1
artifexghostscript>= 0 < 9.27~dfsg-19.27~dfsg-1
artifexghostscript>= 0 < 9.26a~dfsg-19.26a~dfsg-1
artifexghostscript>= 0 < 9.27~dfsg-19.27~dfsg-1
artifexghostscript>= 0 < 9.26a~dfsg-19.26a~dfsg-1
artifexghostscript>= 0 < 9.27~dfsg-19.27~dfsg-1
artifexghostscript>= 0 < 9.26a~dfsg-19.26a~dfsg-1
artifexghostscript>= 0 < 9.27~dfsg-19.27~dfsg-1
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
canonicalubuntu_linux
debiandebian_linux
debiandebian_linux
debianghostscript< ghostscript 9.27~dfsg-1 (bookworm)ghostscript 9.27~dfsg-1 (bookworm)
debianghostscript< ghostscript 9.26a~dfsg-1 (bookworm)ghostscript 9.26a~dfsg-1 (bookworm)
fedoraprojectfedora
fedoraprojectfedora
fedoraprojectfedora
opensuseleap
opensuseleap
opensuseleap

Detection & IOCsextracted from sources · hover to see the quote

filenameghostscript-926-forceput.ps
filenameghostscript-926-forceput-typecheck-example.ps
filenameghostscript-926-forceput-typecheck-executeonly-example.ps
commandgs -dSAFER -f ghostscript-926-forceput.ps
commandgs -dSAFER -sDEVICE=ppmraw -sOutputFile=/dev/null -f ghostscript-926-forceput-typecheck-example.ps
commandgs -dSAFER -sDEVICE=ppmraw -sOutputFile=/dev/null -f ghostscript-926-forceput-typecheck-executeonly-example.ps
  • Detect crafted PostScript files passed to Ghostscript with -dSAFER that attempt to access .forceput or .putgstringcopy operators — these are privileged operators abused in the exploit chain
  • Monitor for Ghostscript invocations processing .ps or .pcd files via downstream applications such as evince, ImageMagick, nautilus, less, gimp, or gv, which can be used as attack vectors
  • Detect PostScript files with .pcd extension delivered via $LESSOPEN, as the default $LESSOPEN can invoke ImageMagick and trigger the exploit
  • Look for PostScript content referencing pdfdict, .forceput, .setglobal, resolvestream, and .pdfruncontext in sequence — these are the staged exploitation primitives used to escape -dSAFER
  • Flag PostScript files that trigger /stackoverflow or /typecheck errors within pseudo-operator context and then attempt operator extraction via error handler inspection
  • Detect use of .putgstringcopy operator in PostScript content — it is a dangerous operator (wrapper around .forceput) that remained accessible after the initial CVE-2019-6116 fix
  • ·Ghostscript versions through 9.26 are vulnerable to CVE-2019-6116; the fix was incomplete and residual privileged operator exposure was tracked as CVE-2019-3839, fixed in 9.27
  • ·The exploit requires precise alignment of the operand stack and may need adjustment for versions older than 9.26, but all versions prior to 9.27 are considered affected
  • ·The -dSAFER flag does NOT provide effective protection against this vulnerability; exploitation is demonstrated explicitly with -dSAFER enabled

CVSS provenance

nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
nvdv2.06.8MEDIUMAV:N/AC:M/Au:N/C:P/I:P/A:P
osv7.8HIGH
vendor_debian7.8HIGH
vendor_redhat7.8HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.