CVE-2023-28879
ghostscript: buffer overflow in base/sbcp.c leading to data corruption
Severity by source
Trivy's own label is CRITICAL. Rated critical by NVD. Rated lower by Amazon (high), Red Hat (medium), AlmaLinux (medium), Oracle (medium), Ubuntu (medium).
Description
In Artifex Ghostscript through 10.01.0, there is a buffer overflow leading to potential corruption of data internal to the PostScript interpreter, in base/sbcp.c. This affects BCPEncode, BCPDecode, TBCPEncode, and TBCPDecode. If the write buffer is filled to one byte less than full, and one then tries to write an escaped character, two bytes are written.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| alma 8 | ghostscript, ghostscript-doc, ghostscript-tools-dvipdf and 5 more | 9.27-11.el8 |
| alma 9 | ghostscript, ghostscript-doc, ghostscript-tools-dvipdf and 5 more | 9.54.0-13.el9 |
| alpine 3.14 | ghostscript | 9.54.0-r2 |
| alpine 3.15 | ghostscript | 9.55.0-r1 |
| alpine 3.16 | ghostscript | 9.56.1-r1 |
| alpine 3.17 | ghostscript | 10.0.0-r1 |
| amazon linux 1 | ghostscript, ghostscript-debuginfo, ghostscript-devel and 1 more | 8.70-24.28.amzn1 |
| amazon linux 2 | ghostscript, ghostscript-cups, ghostscript-debuginfo and 4 more | 9.25-5.amzn2.0.3 |
| amazon linux 2023 | ghostscript, ghostscript-debuginfo, ghostscript-debugsource and 11 more | 9.56.1-7.amzn2023.0.1 |
| debian 10 | ghostscript | 9.27~dfsg-2+deb10u7 |
| debian 11 | ghostscript | 9.53.3~dfsg-7+deb11u4 |
| debian 12 | ghostscript | 10.0.0~dfsg-11 |
Show all 114 entries from 33 sources
| Source | Package | Fixed in |
|---|---|---|
| alma 8 | ghostscript | 9.27-11.el8 |
| alma 8 | ghostscript-doc | 9.27-11.el8 |
| alma 8 | ghostscript-tools-dvipdf | 9.27-11.el8 |
| alma 8 | ghostscript-tools-fonts | 9.27-11.el8 |
| alma 8 | ghostscript-tools-printing | 9.27-11.el8 |
| alma 8 | ghostscript-x11 | 9.27-11.el8 |
| alma 8 | libgs | 9.27-11.el8 |
| alma 8 | libgs-devel | 9.27-11.el8 |
| alma 9 | ghostscript | 9.54.0-13.el9 |
| alma 9 | ghostscript-doc | 9.54.0-13.el9 |
| alma 9 | ghostscript-tools-dvipdf | 9.54.0-13.el9 |
| alma 9 | ghostscript-tools-fonts | 9.54.0-13.el9 |
| alma 9 | ghostscript-tools-printing | 9.54.0-13.el9 |
| alma 9 | ghostscript-x11 | 9.54.0-13.el9 |
| alma 9 | libgs | 9.54.0-13.el9 |
| alma 9 | libgs-devel | 9.54.0-13.el9 |
| alpine 3.14 | ghostscript | 9.54.0-r2 |
| alpine 3.15 | ghostscript | 9.55.0-r1 |
| alpine 3.16 | ghostscript | 9.56.1-r1 |
| alpine 3.17 | ghostscript | 10.0.0-r1 |
| amazon linux 1 | ghostscript | 8.70-24.28.amzn1 |
| amazon linux 1 | ghostscript-debuginfo | 8.70-24.28.amzn1 |
| amazon linux 1 | ghostscript-devel | 8.70-24.28.amzn1 |
| amazon linux 1 | ghostscript-doc | 8.70-24.28.amzn1 |
| amazon linux 2 | ghostscript | 9.25-5.amzn2.0.3 |
| amazon linux 2 | ghostscript-cups | 9.25-5.amzn2.0.3 |
| amazon linux 2 | ghostscript-debuginfo | 9.25-5.amzn2.0.3 |
| amazon linux 2 | ghostscript-doc | 9.25-5.amzn2.0.3 |
| amazon linux 2 | ghostscript-gtk | 9.25-5.amzn2.0.3 |
| amazon linux 2 | libgs | 9.25-5.amzn2.0.3 |
| amazon linux 2 | libgs-devel | 9.25-5.amzn2.0.3 |
| amazon linux 2023 | ghostscript | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-debuginfo | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-debugsource | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-doc | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-gtk | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-gtk-debuginfo | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-tools-dvipdf | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-tools-fonts | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-tools-printing | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-x11 | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | ghostscript-x11-debuginfo | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | libgs | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | libgs-debuginfo | 9.56.1-7.amzn2023.0.1 |
| amazon linux 2023 | libgs-devel | 9.56.1-7.amzn2023.0.1 |
| debian 10 | ghostscript | 9.27~dfsg-2+deb10u7 |
| debian 11 | ghostscript | 9.53.3~dfsg-7+deb11u4 |
| debian 12 | ghostscript | 10.0.0~dfsg-11 |
| debian 13 | ghostscript | 10.0.0~dfsg-11 |
| debian 14 | ghostscript | 10.0.0~dfsg-11 |
| echo | ghostscript | 10.0.0~dfsg-11 |
| Oracle Linux 8 | ghostscript | 9.27-11.el8 |
| Oracle Linux 8 | ghostscript-doc | 9.27-11.el8 |
| Oracle Linux 8 | ghostscript-tools-dvipdf | 9.27-11.el8 |
| Oracle Linux 8 | ghostscript-tools-fonts | 9.27-11.el8 |
| Oracle Linux 8 | ghostscript-tools-printing | 9.27-11.el8 |
| Oracle Linux 8 | ghostscript-x11 | 9.27-11.el8 |
| Oracle Linux 8 | libgs | 9.27-11.el8 |
| Oracle Linux 8 | libgs-devel | 9.27-11.el8 |
| Oracle Linux 9 | ghostscript | 9.54.0-13.el9 |
| Oracle Linux 9 | ghostscript-doc | 9.54.0-13.el9 |
| Oracle Linux 9 | ghostscript-tools-dvipdf | 9.54.0-13.el9 |
| Oracle Linux 9 | ghostscript-tools-fonts | 9.54.0-13.el9 |
| Oracle Linux 9 | ghostscript-tools-printing | 9.54.0-13.el9 |
| Oracle Linux 9 | ghostscript-x11 | 9.54.0-13.el9 |
| Oracle Linux 9 | libgs | 9.54.0-13.el9 |
| Oracle Linux 9 | libgs-devel | 9.54.0-13.el9 |
| rapidfort amazon linux 2023 | ghostscript | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | ghostscript-doc | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | ghostscript-gtk | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | ghostscript-tools-dvipdf | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | ghostscript-tools-fonts | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | ghostscript-tools-printing | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | ghostscript-x11 | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | libgs | 9.56.1-7.amzn2023.0.1 |
| rapidfort amazon linux 2023 | libgs-devel | 9.56.1-7.amzn2023.0.1 |
| rapidfort Oracle Linux 9 | ghostscript | 0:9.54.0-13.el9 |
| rapidfort Oracle Linux 9 | ghostscript-doc | 0:9.54.0-13.el9 |
| rapidfort Oracle Linux 9 | ghostscript-tools-dvipdf | 0:9.54.0-13.el9 |
| rapidfort Oracle Linux 9 | ghostscript-tools-fonts | 0:9.54.0-13.el9 |
| rapidfort Oracle Linux 9 | ghostscript-tools-printing | 0:9.54.0-13.el9 |
| rapidfort Oracle Linux 9 | ghostscript-x11 | 0:9.54.0-13.el9 |
| rapidfort Oracle Linux 9 | libgs | 0:9.54.0-13.el9 |
| rapidfort ubuntu 20.04 | ghostscript | 0:9.55.0~dfsg1-0ubuntu5.2 |
| rapidfort ubuntu 20.04 | rf-ghostscript | 0:9.55.0~dfsg1-0ubuntu5.2 |
| rapidfort ubuntu 22.04 | ghostscript | 0:9.55.0~dfsg1-0ubuntu5.2 |
| rapidfort ubuntu 22.04 | rf-ghostscript | 0:9.55.0~dfsg1-0ubuntu5.2 |
| rapidfort ubuntu 24.04 | ghostscript | 0:9.55.0~dfsg1-0ubuntu5.2 |
| rapidfort ubuntu 24.04 | rf-ghostscript | 0:9.55.0~dfsg1-0ubuntu5.2 |
| Red Hat | ghostscript | no fix listed |
| Red Hat | ghostscript-cups | no fix listed |
| Red Hat | ghostscript-devel | no fix listed |
| Red Hat | ghostscript-doc | no fix listed |
| Red Hat | ghostscript-gtk | no fix listed |
| Red Hat | gimp:flatpak::ghostscript | no fix listed |
| Red Hat | gimp:flatpak::ghostscript-doc | no fix listed |
| Red Hat | gimp:flatpak::ghostscript-tools-dvipdf | no fix listed |
| Red Hat | gimp:flatpak::ghostscript-tools-fonts | no fix listed |
| Red Hat | gimp:flatpak::ghostscript-tools-printing | no fix listed |
| Red Hat | gimp:flatpak::ghostscript-x11 | no fix listed |
| Red Hat | gimp:flatpak::libgs | no fix listed |
| Red Hat | gimp:flatpak::libgs-devel | no fix listed |
| Red Hat | libgs | no fix listed |
| Red Hat | libgs-devel | no fix listed |
| root.io alpine 3.17 | rootio-ghostscript | 10.0.0-r1 |
| root.io debian 12 | rootio-ghostscript | 10.0.0~dfsg-11 |
| ubuntu 16.04-ESM | ghostscript | 9.26~dfsg+0-0ubuntu0.16.04.14+esm5 |
| ubuntu 18.04 | ghostscript | 9.26~dfsg+0-0ubuntu0.18.04.18 |
| ubuntu 18.04-ESM | ghostscript | 9.26~dfsg+0-0ubuntu0.18.04.18 |
| ubuntu 20.04 | ghostscript | 9.50~dfsg-5ubuntu4.7 |
| ubuntu 20.04-ESM | ghostscript | 9.50~dfsg-5ubuntu4.7 |
| ubuntu 22.04 | ghostscript | 9.55.0~dfsg1-0ubuntu5.2 |
| ubuntu 22.10 | ghostscript | 9.56.1~dfsg1-0ubuntu3.1 |
| ubuntu 23.04 | ghostscript | 10.0.0~dfsg1-0ubuntu1.1 |
References
- http://www.openwall.com/lists/oss-security/2023/04/12/4
- https://access.redhat.com/errata/RHSA-2023:6544
- https://access.redhat.com/security/cve/CVE-2023-28879
- https://artifex.com/news/critical-security-vulnerability-fixed-in-ghostscript
- https://bugs.ghostscript.com/show_bug.cgi?id=706494
- https://bugzilla.redhat.com/2184585
- https://bugzilla.redhat.com/2224367
- https://errata.almalinux.org/9/ALSA-2023-6544.html
All 25 references
- https://ghostscript.com/blog/pdfi.html
- https://ghostscript.readthedocs.io/en/latest/News.html
- https://git.ghostscript.com/?p=ghostpdl.git%3Ba=commit%3Bh=37ed5022cecd584de868933b5b60da2e995b3179
- https://linux.oracle.com/cve/CVE-2023-28879.html
- https://linux.oracle.com/errata/ELSA-2023-7053.html
- https://lists.debian.org/debian-lts-announce/2023/04/msg00003.html
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CI6UCKM3XMK7PYNIRGAVDJ5VKN6XYZOE/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/DHJX62KSRIOBZA6FKONMJP7MEFY7LTH2/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/MADLP3GWJFLLFVNZGEDNPMDQR6CCXAHN/
- https://nvd.nist.gov/vuln/detail/CVE-2023-28879
- https://offsec.almond.consulting/ghostscript-cve-2023-28879.html
- https://security.gentoo.org/glsa/202309-03
- https://ubuntu.com/security/notices/USN-6017-1
- https://ubuntu.com/security/notices/USN-6017-2
- https://www.cve.org/CVERecord?id=CVE-2023-28879
- https://www.debian.org/security/2023/dsa-5383
- https://www.openwall.com/lists/oss-security/2023/04/12/4