Memcpy-param-overlap in ghostscript: gs_fapi_do_char

ghostscript Updated 02 Oct 2025

Summary

21/12/2021
MEDIUM
Yes i
Medium
Not published

OSV-2021-1731: Memcpy-param-overlap in gs_fapi_do_char. Affects ghostscript versions >= 75fbddf52051987287e62d13c659eb73ba16982f, < 0f8c0b5742577e31e419e84fbf0bcd42db0c5f41. Fixed in 0f8c0b5742577e31e419e84fbf0bcd42db0c5f41. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ghostscript is an open-source interpreter for the PostScript language and the PDF file format. It is widely used for rendering and converting PDF files. The vulnerability in question, gs_fapi_do_char, affects the functionality of Ghostscript related to font handling and character rendering.

Vulnerability Detail

The vulnerability, identified as Memcpy-param-overlap, was reported through the OSS-Fuzz project. It occurs when the memcpy function is called with overlapping source and destination memory regions. In the case of gs_fapi_do_char, this can lead to a crash. An attacker could potentially exploit this vulnerability to execute arbitrary code or cause a denial-of-service condition.

How To Fix

Minimum fixed version

0f8c0b5742577e31e419e84fbf0bcd42db0c5f41

This is the first release that contains the fix.

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

Workaround

There is no specific workaround mentioned for this vulnerability. However, users can mitigate the risk by ensuring they are using an updated version of Ghostscript that includes the fix.

Conclusion

In conclusion, the Memcpy-param-overlap vulnerability in gs_fapi_do_char of Ghostscript can potentially lead to code execution or denial-of-service. It is crucial to update Ghostscript to a version that includes the fix to mitigate the risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for ghostscript →

Share this vulnerability

FAQ

Ghostscript is an open-source interpreter for the PostScript language and the PDF file format. It is commonly used for rendering and converting PDF files.

The vulnerability can potentially allow an attacker to execute arbitrary code or cause a denial-of-service condition.

To fix this vulnerability, update Ghostscript to a version that includes the fix. Refer to the provided commit in the Git repository for the specific fix.

There is no specific workaround mentioned for this vulnerability. However, using an updated version of Ghostscript can mitigate the risk.

For more information, refer to the provided OSS-Fuzz report and the source link in the database-specific details section of this report.

Related vulnerabilities

Recent vulnerabilities recorded for ghostscript.

How To Fix

Minimum fixed version

0f8c0b5742577e31e419e84fbf0bcd42db0c5f41

This is the first release that contains the fix.

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