CVE-2013-5653
Medium · 5.5CVSS
5.5
EPSS
2.0%
Published
Mar 7, 2017
CISA due date
—
Cloudanix analysis
A flaw in how some software handles certain document files could let someone read private files on the computer without permission.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Low
- Impact
- Data Exposure
- Component
- Application
- Class
- Information Disclosure
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The getenv and filenameforall functions in the PostScript interpreter bypass the -dSAFER sandbox, permitting a crafted input file to read arbitrary files from the host filesystem.
Why it matters to the business
Attackers can exfiltrate sensitive configuration files, credentials, or proprietary data from any system that processes untrusted PostScript content; the presence in 98 downstream dependents amplifies exposure across the software supply chain.
How an attack unfolds
An attacker crafts a PostScript file that invokes getenv or filenameforall to read target files, embeds the file in a document or job submitted to an affected application, and receives the leaked contents in the resulting output or error stream.
How to fix it
Upgrade tensorflow (Bitnami) to version 2.12.1 or later; ensure any bundled Ghostscript component is also updated to a release that honors -dSAFER.
How to confirm the fix worked
Confirm the installed package version matches or exceeds the fixed release; test with a known non-SAFER-violating PostScript sample to verify sandbox behavior.
Typical attack path
- Identify an entry point that accepts or renders PostScript (e.g., document upload, print job, image conversion).
- Craft a minimal PostScript payload using getenv or filenameforall to read a chosen file path.
- Submit the payload through the normal processing channel.
- Capture the disclosed file contents from the generated output or log artifacts.
How to detect it
Review application and system logs for unexpected file-open operations or error messages containing absolute paths after PostScript jobs; correlate with process execution of the affected binary on systems that recently processed documents.
What your security team should do
- Apply the listed fixed version immediately given the 3502-day exposure window.
- Disable PostScript processing for untrusted input until patches are deployed.
- Add file-type and content filters that block or sanitize PostScript jobs at ingestion points.
The record
The getenv and filenameforall functions in Ghostscript 9.10 ignore the "-dSAFER" argument, which allows remote attackers to read data via a crafted postscript file.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:10 | ghostscript | 0 | 9.19~dfsg-3.1 |
| Debian:11 | ghostscript | 0 | 9.19~dfsg-3.1 |
| Debian:12 | ghostscript | 0 | 9.19~dfsg-3.1 |
| Debian:13 | ghostscript | 0 | 9.19~dfsg-3.1 |
| Debian:7 | ghostscript | 0 | 9.05~dfsg-6.3+deb7u3 |
| Debian:8 | ghostscript | 0 | 9.06~dfsg-2+deb8u3 |
| Red Hat:enterprise_linux:6::client | ghostscript | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::client | ghostscript-debuginfo | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::client | ghostscript-devel | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::client | ghostscript-doc | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::client | ghostscript-gtk | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | ghostscript | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | ghostscript-debuginfo | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | ghostscript-devel | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | ghostscript-doc | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::computenode | ghostscript-gtk | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::server | ghostscript | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::server | ghostscript-debuginfo | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::server | ghostscript-devel | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::server | ghostscript-doc | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::server | ghostscript-gtk | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | ghostscript | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | ghostscript-debuginfo | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | ghostscript-devel | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | ghostscript-doc | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:6::workstation | ghostscript-gtk | 0 | 0:8.70-21.el6_8.1 |
| Red Hat:enterprise_linux:7::client | ghostscript | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::client | ghostscript-cups | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::client | ghostscript-debuginfo | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::client | ghostscript-devel | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::client | ghostscript-doc | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::client | ghostscript-gtk | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | ghostscript | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | ghostscript-cups | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | ghostscript-debuginfo | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | ghostscript-devel | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | ghostscript-doc | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::computenode | ghostscript-gtk | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::server | ghostscript | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::server | ghostscript-cups | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::server | ghostscript-debuginfo | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::server | ghostscript-devel | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::server | ghostscript-doc | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::server | ghostscript-gtk | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | ghostscript | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | ghostscript-cups | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | ghostscript-debuginfo | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | ghostscript-devel | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | ghostscript-doc | 0 | 0:9.07-20.el7_3.1 |
| Red Hat:enterprise_linux:7::workstation | ghostscript-gtk | 0 | 0:9.07-20.el7_3.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | ghostscript | 0 | 9.15-11.1 |
| SUSE:Linux Enterprise Desktop 12 SP1 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Desktop 12 SP2 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Point of Sale 11 SP3 | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Server 11 SP2-LTSS | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Server 11 SP3-LTSS | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Server 11 SP3-TERADATA | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Server 11 SP4 | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Server 12 SP1 | ghostscript | 0 | 9.15-11.1 |
| SUSE:Linux Enterprise Server 12 SP1 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Server 12 SP2 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Server 12-LTSS | ghostscript | 0 | 9.15-11.1 |
| SUSE:Linux Enterprise Server for Raspberry Pi 12 SP2 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Server for SAP Applications 11 SP4 | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 | ghostscript | 0 | 9.15-11.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | ghostscript | 0 | 9.15-11.1 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP1 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Server for SAP Applications 12 SP2 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | ghostscript | 0 | 9.15-11.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | ghostscript | 0 | 9.15-17.2 |
| SUSE:Manager 2.1 | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:Manager Proxy 2.1 | ghostscript-library | 0 | 8.62-32.38.1 |
| SUSE:OpenStack Cloud 5 | ghostscript-library | 0 | 8.62-32.38.1 |
| Ubuntu:14.04:LTS | ghostscript | 0 | 9.10~dfsg-0ubuntu10.5 |
| Ubuntu:16.04:LTS | ghostscript | 0 | 9.18~dfsg~0-0ubuntu2.2 |
| openSUSE:Tumbleweed | ghostscript | 0 | 9.20-2.1 |
Related vulnerabilities
- CVE-2023-38559 A buffer overflow flaw was found in base/gdevdevn.c:1973 in devn_pcx_write_rle() in… Also affects ghostscript
- CVE-2021-45944 Ghostscript GhostPDL 9.50 through 9.53.3 has a use-after-free in sampled_data_sample… Also affects ghostscript
- CVE-2016-7976 The PS Interpreter in Ghostscript 9.18 and 9.20 allows remote attackers to execute… Also affects ghostscript
- CVE-2009-3560 The big2_toUtf8 function in lib/xmltok.c in libexpat in Expat 2.0.1, as used in the… Also affects ghostscript
- CVE-2009-3720 The updatePosition function in lib/xmltok_impl.c in libexpat in Expat 2.0.1, as used in… Also affects ghostscript
- CVE-2008-0411 Stack-based buffer overflow in the zseticcspace function in zicc.c in Ghostscript 8.61… Also affects ghostscript
- CVE-2024-46956 An issue was discovered in psi/zfile.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript
- CVE-2024-46955 An issue was discovered in psi/zcolor.c in Artifex Ghostscript before 10.04.0. Also affects ghostscript