<Vulnerability name="CVE-2026-101258">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Important</ThreatSeverity>
    <PublicDate>2026-10-06T15:56:02</PublicDate>
    <Bugzilla id="2542396" url="https://bugzilla.redhat.com/show_bug.cgi?id=2542396" xml:lang="en:us">
ghostscript: ghostscript: -dSAFER sandbox bypass via Type 5 shading OOB write and procedure-stream use-after-free
    </Bugzilla>
    <CVSS3 status="verified">
        <CVSS3BaseScore>7.8</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-787</CWE>
    <Details xml:lang="en:us" source="Mitre">
A flaw was found in Ghostscript. When Ghostscript renders a crafted PostScript or EPS document, it can bypass the -dSAFER sandbox and execute arbitrary shell commands in the context of the Ghostscript process. The issue chains memory corruption in document parsing with disabling of internal path access controls at runtime. An attacker can deliver the document directly or through formats that delegate rendering to Ghostscript (for example EPS import or print conversion workflows). Successful exploitation can compromise confidentiality, integrity, and availability of data accessible to the process running Ghostscript.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
A flaw was found in Ghostscript. When Ghostscript renders a crafted PostScript or EPS document, it can bypass the -dSAFER sandbox and execute arbitrary shell commands in the context of the Ghostscript process. The issue chains memory corruption in document parsing with disabling of internal path access controls at runtime. An attacker can deliver the document directly or through formats that delegate rendering to Ghostscript (for example EPS import or print conversion workflows). Successful exploitation can compromise confidentiality, integrity, and availability of data accessible to the process running Ghostscript.
    </Details>
    <Statement xml:lang="en:us">
This vulnerability is rated Important severity because a crafted document can achieve arbitrary command execution when Ghostscript processes it, including when the -dSAFER sandbox flag is enabled. Exploitation requires the victim or an application to process attacker-controlled content locally; it is not a remote network attack against a listening Ghostscript service. In typical desktop and document-conversion scenarios, user interaction is required to open or convert the file.

Ghostscript runs as an unprivileged user in most deployments, but commands still run with that user's privileges. SELinux targeted policy in enforcing mode did not prevent exploitation for common domains that run gs directly (for example unconfined_t and initrc_t in Red Hat testing). Some confined domains may limit follow-on file writes depending on policy; there is no Ghostscript-specific SELinux domain. Blocking ImageMagick's Ghostscript delegate via policy.xml is not a practical workaround on Red Hat Enterprise Linux 8, 9, or 10 because the ImageMagick RPM is not shipped on those releases.

Red Hat Enterprise Linux 10 ships Ghostscript 10.02.1 and is affected; command execution under -dSAFER was confirmed on RHEL 10.2 x86_64 lab systems. Red Hat Enterprise Linux 9 (Ghostscript 9.54.0) and Red Hat Enterprise Linux 8 (Ghostscript 9.27) ship older upstream lines; impact on those releases is still under analysis relative to the public proof of concept, which targets the 10.x series. Red Hat In-Vehicle OS and Fedora ship Ghostscript builds that are being tracked under the same flaw. Red Hat Enterprise Linux 6 and 7 Extended Life Cycle Support include Ghostscript packages; affectedness is not yet resolved for those streams.
    </Statement>
    <Acknowledgement xml:lang="en:us">
Red Hat would like to thank Akiyoshi Kurita and V12 Security (V12 Security) for reporting this issue.
    </Acknowledgement>
    <Mitigation xml:lang="en:us">
No mitigation is currently available that meets Red Hat Product Security's standards for usability, deployment, applicability, or stability.
    </Mitigation>
    <AffectedRelease cpe="cpe:/o:redhat:enterprise_linux:10.2">
        <ProductName>Red Hat Enterprise Linux 10</ProductName>
        <ReleaseDate>2026-10-15T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:83551">RHSA-2026:83551</Advisory>
        <Package name="ghostscript">ghostscript-0:10.02.1-16.el10_2.3</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:enterprise_linux:8">
        <ProductName>Red Hat Enterprise Linux 8</ProductName>
        <ReleaseDate>2026-10-15T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:83552">RHSA-2026:83552</Advisory>
        <Package name="ghostscript">ghostscript-0:9.27-19.el8_10</Package>
    </AffectedRelease>
    <AffectedRelease cpe="cpe:/a:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <ReleaseDate>2026-10-15T00:00:00Z</ReleaseDate>
        <Advisory type="RHSA" url="https://access.redhat.com/errata/RHSA-2026:83553">RHSA-2026:83553</Advisory>
        <Package name="ghostscript">ghostscript-0:9.54.0-19.el9_8.3</Package>
    </AffectedRelease>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:6">
        <ProductName>Red Hat Enterprise Linux 6</ProductName>
        <FixState>Affected</FixState>
        <PackageName>ghostscript</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:6">
        <ProductName>Red Hat Enterprise Linux 6</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>ghostscript-fonts</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Affected</FixState>
        <PackageName>ghostscript</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Affected</FixState>
        <PackageName>ghostscript-chinese</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>ghostscript-fonts</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-101258
https://nvd.nist.gov/vuln/detail/CVE-2026-101258
https://github.com/v12-security/pocs/tree/main/ghostscript
    </References>
</Vulnerability>