CVE-2020-36773 is a critical (CVSS 9.8) out of bounds write and use after free in Ghostscript's txtwrite device. A single PDF character code that maps to more than one Unicode code point, such as a ligature, triggers it. Versions before 9.53.0 are affected. Upgrade to 9.53.0 or later.
What's affected
- Artifex Ghostscript before 9.53.0, per the record. Listed affected releases include 9.51, 9.52 and 9.52.1.
- Fixed: 9.53.0. The release page I fetched shows the 9.53.0 tag and does not name this CVE, so rely on the record and the project's bug 702229.
The record scores it 9.8 (Critical) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. The record does not flag it as a CISA Known Exploited Vulnerability, and none of the pages I read report exploitation in the wild.
How to check if you're exposed
Run gs --version to see the version. Also check tools that embed or call Ghostscript, such as document converters and image libraries, because they may bundle their own copy. On Debian family systems use dpkg -l ghostscript, and note distributions often backport fixes without changing the upstream version number.
What to do now
- Run
gs --versionon servers and build hosts. - Find software that shells out to Ghostscript.
- Upgrade to 9.53.0 or later, or a distribution package that lists this CVE as fixed.
- Where conversion of untrusted PDFs is needed, run Ghostscript in a sandbox.
- Specifically avoid the txtwrite device on untrusted input until patched.
After you patch, record the new version for Ghostscript in your asset inventory, and confirm it with the same check you used above. A fix that was never verified is easy to forget, and an inventory that shows versions is what lets you answer the next advisory in minutes instead of days.
Why it matters
The record maps this to CWE-787, out of bounds write, and CWE-416, use after free. The text extraction code assumed one character code produces one Unicode value. When a ligature produces several, the buffer is too small, and memory is written outside it.
Ghostscript often sits behind other tools, so the question is not whether you installed it but whether something calls it. Reachability checks help here by showing which of your applications actually invoke the vulnerable path.
To check open source components in your own projects for known CVEs like this one, try the free in-browser dependency scan at gold.safeguard.sh/scan, or look the CVE up in the Gold directory.
Try it yourself
Click through it at your own pace, or open it full screen.
Quick check
Does a distribution backport change the version number?
Often it does not. Check your distribution's security tracker for this CVE rather than relying on the upstream version string.
How do I find every place Ghostscript is used?
Start with an inventory of installed software and versions, because you cannot patch what you have not found. Check servers, build hosts, test copies and anything a vendor bundles. For open source libraries, a dependency scan or SBOM gives the same list for your code.
Sources
- https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/tag/gs9530
- https://bugs.ghostscript.com/show_bug.cgi?id=702229
Last reviewed: 19 October 2026.