# CVE-2026-101258: Ghostscript: ghostscript: -dsafer sandbox bypass via type 5 shading oob write and procedure-stream use-after-free

> Attackers can bypass the -dSAFER sandbox in Ghostscript to execute arbitrary shell commands via crafted PostScript or EPS documents.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 6 Oct 2026
- **Updated:** 15 Oct 2026
- **Also known as:** BELL-CVE-2026-101258, CLSA-2026-1792809195, CLSA-2026-1792809614, DEBIAN-CVE-2026-101258, ECHO-b554-1d48-28ad, GHSA-g96p-c3cq-wp28, UBUNTU-CVE-2026-101258

## What is CVE-2026-101258?

CVE-2026-101258 is a high-severity code injection vulnerability in Red Hat Enterprise Linux 10, published on 6 Oct 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

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.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2026-101258?


## How do I fix CVE-2026-101258?

Apply the vendor's patch.

## Is CVE-2026-101258 being exploited?

There is no known exploitation of CVE-2026-101258 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-101258 and fix it if it is affected.

What it is: CVE-2026-101258 is a high-severity code injection vulnerability in Red Hat Enterprise Linux 10, published on 6 Oct 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-101258 in the wild and no public exploit code.

Affected product: Red Hat Enterprise Linux 10. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-101258/ (Markdown: https://insights.sbomify.com/CVE-2026-101258/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-101258
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-101258
- OSV: https://osv.dev/vulnerability/CVE-2026-101258

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-101258/
Summaries are generated and may contain mistakes; the official description above is the record.
