ghostscript: /invalidaccess bypass after failed restore (699654)
Published Sep 5, 2018
7.8
HIGHCVSS 3.0
EPSS 92.50%
Description
An issue was discovered in Artifex Ghostscript before 9.24. Incorrect "restoration of privilege" checking during handling of /invalidaccess exceptions could be used by attackers able to supply crafted PostScript to execute code using the "pipe" instruction.
Affected products
No data.
Configuration 1
- 8.0
- 9.0
Configuration 2
- < 9.24
Configuration 3
- 14.04
- 16.04
- 18.04
Configuration 4
- 6.0
- 7.0
- 6.0
- 7.0
- 7.5
- 6.0
- 7.0
Configuration 5
- < 9.26
No data.
Red Hat Enterprise Linux 6
ghostscript-0:8.70-24.el6_10.2
Fixed · RHSA-2018:3760
Red Hat Enterprise Linux 7
ghostscript-0:9.07-29.el7_5.2
Fixed · RHSA-2018:2918
Red Hat Enterprise Linux 5
ghostscript
Will not fix
Red Hat Enterprise Linux 8
ghostscript
Not affected
Red Hat OpenShift Container Platform 3.10
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.11
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.2
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.3
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.4
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.5
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.6
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.7
mediawiki
Not affected
Red Hat OpenShift Container Platform 3.9
mediawiki
Not affected
Red Hat OpenShift Enterprise 3.0
mediawiki
Not affected
Red Hat OpenShift Enterprise 3.1
mediawiki
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 6 | ghostscript-0:8.70-24.el6_10.2 | Fixed | RHSA-2018:3760 |
| Red Hat Enterprise Linux 7 | ghostscript-0:9.07-29.el7_5.2 | Fixed | RHSA-2018:2918 |
| Red Hat Enterprise Linux 5 | ghostscript | Will not fix | n/a |
| Red Hat Enterprise Linux 8 | ghostscript | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.10 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.11 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.2 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.3 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.4 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.5 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.6 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.7 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Container Platform 3.9 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Enterprise 3.0 | mediawiki | Not affected | n/a |
| Red Hat OpenShift Enterprise 3.1 | mediawiki | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat statement
This issue did affect the versions of ghostscript as shipped with Red Hat Enterprise Linux 5, 6, and 7. Red Hat Enterprise Linux 5 is now in Extended Life Phase of the support and maintenance life cycle. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Red Hat Enterprise Linux Life Cycle: https://access.redhat.com/support/policy/updates/errata/.
Red Hat mitigation
* ImageMagick relies on ghostscript when processing certain files formats. Thus, ImageMagick can be used as an attack vector. In order to prevent ImageMagick from processing those files on Red Hat Enterprise Linux 6 and 7, you can disable the use of ghostscript and the processing of PS, EPS, PDF, and XPS file formats in ImageMagick's security policy by opening /etc/ImageMagick/policy.xml and adding the following lines to the "<policymap>" section of the file: ``` <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" /> <policy domain="delegate" rights="none" pattern="gs" /> ``` * Additionally, this issue can be triggered when processing files in order to generate thumbnails, for example when browsing a folder containing a malicious PostScript file in Nautilus. To prevent this, remove or rename the "/usr/bin/evince-thumbnailer" executable. In Red Hat Enterprise Linux v.7.6 and above, the thumbnailing is done in a sandbox. * It is possible to run PDF/PS viewers, such as evince and okular, in a SELinux sandbox using the `sandbox` command from the policycoreutils-sandbox package : $ sandbox -X evince <untrusted-file.pdf> The sandbox will prevent an attacker to make modifications on the file system.
Metrics
No CVSS v4.0 score for this CVE.
No CVSS v3.1 score for this CVE.
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
1 other source (Red Hat) ▾
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
AV:N/AC:M/Au:N/C:C/I:C/A:C
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v1
- EPSS v2
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (55 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 92.50% (0.92499) | 99.82th | v5 (v2026.06.15) |
| Sep 22, 2026 | 92.50% (0.92499) | 99.82th | v5 (v2026.06.15) |
| Sep 21, 2026 | 96.78% (0.96783) | 99.89th | v5 (v2026.06.15) |
| Sep 6, 2026 | 92.50% (0.92499) | 99.82th | v5 (v2026.06.15) |
| Sep 5, 2026 | 96.78% (0.96783) | 99.89th | v5 (v2026.06.15) |
| Aug 30, 2026 | 92.50% (0.92499) | 99.82th | v5 (v2026.06.15) |
| Aug 28, 2026 | 96.78% (0.96783) | 99.88th | v5 (v2026.06.15) |
| Aug 24, 2026 | 92.50% (0.92499) | 99.82th | v5 (v2026.06.15) |
| Aug 23, 2026 | 96.78% (0.96783) | 99.89th | v5 (v2026.06.15) |
| Jun 15, 2026 | 92.50% (0.92499) | 99.81th | v5 (v2026.06.15) |
| Mar 4, 2026 | 91.76% (0.91758) | 99.68th | v4 (v2025.03.14) |
| Mar 1, 2026 | 90.61% (0.90606) | 99.61th | v4 (v2025.03.14) |
| Feb 4, 2026 | 91.76% (0.91758) | 99.67th | v4 (v2025.03.14) |
| Feb 1, 2026 | 90.61% (0.90606) | 99.61th | v4 (v2025.03.14) |
| Jan 4, 2026 | 91.76% (0.91758) | 99.67th | v4 (v2025.03.14) |
| Jan 1, 2026 | 90.61% (0.90606) | 99.60th | v4 (v2025.03.14) |
| Dec 4, 2025 | 91.76% (0.91758) | 99.66th | v4 (v2025.03.14) |
| Dec 1, 2025 | 90.61% (0.90606) | 99.59th | v4 (v2025.03.14) |
| Nov 21, 2025 | 91.76% (0.91758) | 99.66th | v4 (v2025.03.14) |
| Nov 18, 2025 | 89.60% (0.89600) | 99.65th | v4 (v2025.03.14) |
| Nov 1, 2025 | 90.95% (0.90955) | 99.62th | v4 (v2025.03.14) |
| Oct 27, 2025 | 92.40% (0.92401) | 99.71th | v4 (v2025.03.14) |
| Oct 1, 2025 | 90.95% (0.90955) | 99.63th | v4 (v2025.03.14) |
| Jul 13, 2025 | 92.18% (0.92178) | 99.69th | v4 (v2025.03.14) |
| Mar 17, 2025 | 91.13% (0.91125) | 99.63th | v4 (v2025.03.14) |
| Dec 17, 2024 | 95.83% (0.95834) | 99.60th | v3 (v2023.03.01) |
| Dec 12, 2024 | 97.26% (0.97261) | 99.89th | v3 (v2023.03.01) |
| Jul 15, 2024 | 97.27% (0.97269) | 99.86th | v3 (v2023.03.01) |
| Mar 31, 2024 | 97.33% (0.97333) | 99.88th | v3 (v2023.03.01) |
| Mar 7, 2024 | 97.27% (0.97266) | 99.83th | v3 (v2023.03.01) |
| Feb 17, 2024 | 97.19% (0.97192) | 99.80th | v3 (v2023.03.01) |
| Jan 27, 2024 | 97.15% (0.97149) | 99.76th | v3 (v2023.03.01) |
| Jan 5, 2024 | 97.09% (0.97094) | 99.73th | v3 (v2023.03.01) |
| Dec 15, 2023 | 97.16% (0.97155) | 99.76th | v3 (v2023.03.01) |
| Nov 28, 2023 | 97.17% (0.97169) | 99.76th | v3 (v2023.03.01) |
| Nov 10, 2023 | 97.28% (0.97277) | 99.82th | v3 (v2023.03.01) |
| Oct 23, 2023 | 97.29% (0.97294) | 99.82th | v3 (v2023.03.01) |
| Oct 4, 2023 | 97.36% (0.97359) | 99.86th | v3 (v2023.03.01) |
| Sep 17, 2023 | 97.39% (0.97395) | 99.87th | v3 (v2023.03.01) |
| Aug 30, 2023 | 97.42% (0.97422) | 99.89th | v3 (v2023.03.01) |
| Aug 15, 2023 | 97.44% (0.97438) | 99.91th | v3 (v2023.03.01) |
| Jul 8, 2023 | 97.41% (0.97413) | 99.88th | v3 (v2023.03.01) |
| Jun 26, 2023 | 96.80% (0.96801) | 99.50th | v3 (v2023.03.01) |
| Jun 6, 2023 | 96.97% (0.96975) | 99.58th | v3 (v2023.03.01) |
| May 8, 2023 | 96.99% (0.96992) | 99.57th | v3 (v2023.03.01) |
| Apr 21, 2023 | 97.43% (0.97433) | 99.89th | v3 (v2023.03.01) |
| Mar 19, 2023 | 97.41% (0.97413) | 99.85th | v3 (v2023.03.01) |
| Mar 7, 2023 | 97.40% (0.97402) | 99.83th | v3 (v2023.03.01) |
| Mar 6, 2023 | 71.51% (0.71511) | 99.20th | v2 (v2022.01.01) |
| Nov 12, 2022 | 71.51% (0.71511) | 99.17th | v2 (v2022.01.01) |
| Aug 22, 2022 | 74.37% (0.74368) | 99.27th | v2 (v2022.01.01) |
| Feb 4, 2022 | 76.99% (0.76992) | 99.28th | v2 (v2022.01.01) |
| Feb 3, 2022 | 66.46% (0.66462) | 99.37th | v1 |
| Sep 1, 2021 | 66.46% (0.66462) | 99.82th | v1 |
| Apr 14, 2021 | 66.46% (0.66462) | 0.00th | v1 |
No CWE recorded.
References (19)
- http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=5516c614dc33662a2afdc377159f70218e67bde5 x_refsource_MISC
- http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=78911a01b67d590b4a91afac2e8417360b934156 x_refsource_MISC
- http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=79cccf641486a6595c43f1de1cd7ade696020a31 x_refsource_MISC
- http://git.ghostscript.com/?p=ghostpdl.git%3Ba=commitdiff%3Bh=520bb0ea7519aa3e79db78aaf0589dae02103764 x_refsource_CONFIRM
- http://seclists.org/oss-sec/2018/q3/142 x_refsource_MISCExploitMailing ListThird Party Advisory
- http://www.securityfocus.com/bid/105122 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- https://access.redhat.com/errata/RHSA-2018:2918 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/errata/RHSA-2018:3760 vendor-advisoryx_refsource_REDHATThird Party Advisory
- https://access.redhat.com/security/cve/CVE-2018-16509 Vendor Advisory
- https://bugs.ghostscript.com/show_bug.cgi?id=699654 x_refsource_MISCIssue TrackingPermissions RequiredThird Party Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1619748 Issue Tracking
- https://lists.debian.org/debian-lts-announce/2018/09/msg00015.html mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2018-16509
- https://security.gentoo.org/glsa/201811-12 vendor-advisoryx_refsource_GENTOOThird Party Advisory
- https://usn.ubuntu.com/3768-1/ vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://www.artifex.com/news/ghostscript-security-resolved/ x_refsource_MISCVendor Advisory
- https://www.cve.org/CVERecord?id=CVE-2018-16509
- https://www.debian.org/security/2018/dsa-4294 vendor-advisoryx_refsource_DEBIANThird Party Advisory
- https://www.exploit-db.com/exploits/45369/ exploitx_refsource_EXPLOIT-DBThird Party AdvisoryVDB Entry
Change history (0)
No recorded changes yet.