CVE-2024-33870: Path Traversal

Published Jun 24, 2024
·
Updated

An issue was discovered in Artifex Ghostscript before 10.03.1. There is path traversal (via a crafted PostScript document) to arbitrary files if the current directory is in the permitted paths. For example, there can be a transformation of ../../foo to ./../../foo and this will grant access if ./ is permitted.

Other sources

When the gpvalidatepathlen function validates a path, it distinguishes between absolute and relative paths. In the case of relative paths, it will check the path with and without the current-directory-prefix ("foo" and "./foo").

The problem is that it doesn't take into account paths with a parent-directory-prefix. So a path like "../../foo" is also tested as "./../../foo" and if the current directory "./" is in the permitted paths, it will pass the check and you can access arbitrary files.

References: ttps://ghostscript.readthedocs.io/en/gs10.03.1/News.html https://bugs.ghostscript.com/showbug.cgi?id=707686

Upstream commit: https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=79aef19c685984dc3da2dc090450407d9fbcff80

Red Hat

Affected Software

3 affected componentsFixes available
debian/ghostscript
9.53.3~dfsg-7+deb11u710.0.0~dfsg-11+deb12u410.0.0~dfsg-11+deb12u510.03.1~dfsg-2
redhat/ghostscript<10.03.1
10.03.1
Artifex GhostScript<10.03.1

Event History

Jul 3, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Data Sourced
via NVD·07:15 PM
Description
Data Sourced
via NVD·07:15 PM
SeverityWeakness
Sep 15, 2024
Data Sourced
via Ubuntu·12:23 PM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-33870?

CVE-2024-33870 is classified as a high severity vulnerability due to its potential for path traversal attacks.

2

How do I fix CVE-2024-33870?

To mitigate CVE-2024-33870, upgrade Ghostscript to version 10.03.1 or later.

3

What types of systems are affected by CVE-2024-33870?

CVE-2024-33870 affects Ghostscript versions prior to 10.03.1 on various operating systems including Debian and Red Hat.

4

What is the impact of CVE-2024-33870?

CVE-2024-33870 allows attackers to access arbitrary files through a crafted PostScript document, compromising system confidentiality.

5

Is there a workaround for CVE-2024-33870?

A temporary workaround for CVE-2024-33870 includes restricting access to allowed directories and avoiding the processing of untrusted PostScript documents.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203