Bug 2293958 (CVE-2024-33869) - CVE-2024-33869 ghostscript: path traversal and command execution due to path reduction
Summary: CVE-2024-33869 ghostscript: path traversal and command execution due to path ...
Keywords:
Status: NEW
Alias: CVE-2024-33869
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2296285
Blocks: 2278776
TreeView+ depends on / blocked
 
Reported: 2024-06-24 15:54 UTC by Robb Gatica
Modified: 2024-09-12 14:28 UTC (History)
0 users

Fixed In Version: ghostscript 10.03.1
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2024:6650 0 None None None 2024-09-12 14:28:35 UTC
Red Hat Product Errata RHSA-2024:6197 0 None None None 2024-09-03 10:24:56 UTC
Red Hat Product Errata RHSA-2024:6466 0 None None None 2024-09-09 01:31:33 UTC

Description Robb Gatica 2024-06-24 15:54:34 UTC
The function "gp_validate_path_len" first tests if the path has a cwd prefix and then reduces the path.

In the case of a path like "./../tmp/aa" it will first see that it has a cwd prefix and then reduce it to "../tmp/aa". When validation fails, it tries the variant without the cwd prefix by skipping the first two characters. But this will skip the ".." and validate "/tmp/aa", which is an allowed path (on Linux).

References:
https://ghostscript.readthedocs.io/en/gs10.03.1/News.html
https://bugs.ghostscript.com/show_bug.cgi?id=707691

Upstream commits:
https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=5ae2e320d69a7d0973011796bd388cd5befa1a43
https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/commit/?id=f5336e5b4154f515ac83bc5b9eba94302e6618d4

Comment 2 errata-xmlrpc 2024-09-03 10:24:55 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2024:6197 https://access.redhat.com/errata/RHSA-2024:6197

Comment 3 errata-xmlrpc 2024-09-09 01:31:32 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9.2 Extended Update Support

Via RHSA-2024:6466 https://access.redhat.com/errata/RHSA-2024:6466


Note You need to log in before you can comment on or make changes to this bug.