Critical Buffer Overflow Vulnerability in Ghostscript Package

ghostscript Updated 03 Oct 2025

Summary

25/03/2025
N/A
Yes i
Critical
9.8

UBUNTU-CVE-2025-27831: An issue was discovered in Artifex Ghostscript before 10.05.0. Affects ghostscript versions < 9.55.0~dfsg1-0ubuntu5.11. Fixed in 9.55.0~dfsg1-0ubuntu5.11. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Ghostscript is an interpreter for the PostScript language and for PDF. It is widely used for processing and rendering documents in various formats. The package is integral to many applications that require document manipulation and rendering capabilities. However, it has been found to be vulnerable to a buffer overflow issue that could potentially allow attackers to exploit the system.

Vulnerability Detail

An issue was discovered in Artifex Ghostscript before version 10.05.0. The vulnerability arises from the DOCXWRITE TXTWRITE device, which has a text buffer overflow due to the handling of long characters in the file 'devices/vector/doc_common.c'. This flaw can lead to arbitrary code execution, allowing attackers to compromise the affected system. The CVSS score for this vulnerability is 9.8, indicating a critical level of severity.

How To Fix

Minimum fixed version

9.55.0~dfsg1-0ubuntu5.11

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ghostscript

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, users can avoid using the DOCXWRITE TXTWRITE device until the package is updated. This can help mitigate the risk of exploitation until a permanent fix is applied.

Conclusion

The Ghostscript package has a critical vulnerability that can lead to severe security risks. It is crucial for users to update their installations to the latest patched versions to protect their systems. Utilizing tools like Vulert can help monitor for such vulnerabilities effectively.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

The vulnerability is a buffer overflow that can lead to arbitrary code execution due to improper handling of long characters in Ghostscript.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Visit Vulert Scanner to check your application without needing to sign up.

If exploited, this vulnerability could allow attackers to execute arbitrary code on the affected system, potentially leading to data breaches or system compromise.

Yes, patches are available for both Ubuntu 22.04 LTS and Ubuntu 24.04 LTS. Users should update to the specified fixed versions of Ghostscript.

If immediate updates are not possible, refrain from using the DOCXWRITE TXTWRITE device as a temporary workaround to reduce the risk of exploitation.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

Minimum fixed version

9.55.0~dfsg1-0ubuntu5.11

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ghostscript

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback