CVE-2023-52138 (published 2024-02-05T15:15Z)

Engrampa is an archive manager for the MATE environment. Engrampa is found to be vulnerable to a Path Traversal vulnerability that can be leveraged to achieve full Remote Command Execution (RCE) on the target. While handling CPIO archives, the Engrampa Archive manager follows symlink, cpio by default will follow stored symlinks while extracting and the Archiver will not check the symlink location, which leads to arbitrary file writes to unintended locations. When the victim extracts the archive, the attacker can craft a malicious cpio or ISO archive to achieve RCE on the target system. This vulnerability was fixed in commit 63d5dfa.\n

CVSS v3 base score: 9.6, CRITICAL (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H)

Weakness information:
cwe_id: CWE-22
cwe_name: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
description: The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
extended_description: 
            Many file operations are intended to take place within a restricted directory. By using special elements such as ".." and "/" separators, attackers can escape outside of the restricted location to access files or directories that are elsewhere on the system. One of the most common special elements is the "../" sequence, which in most modern operating systems is interpreted as the parent directory of the current location. This is referred to as relative path traversal. Path traversal also covers the use of absolute pathnames such as "/usr/local/bin" to access unexpected files. This is referred to as absolute path traversal.
         
         
cwe_id: CWE-59
cwe_name: Improper Link Resolution Before File Access ('Link Following')
description: The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
extended_description: 
            
            
         
         

Fix information:
repo_url: https://github.com/mate-desktop/engrampa
commit_details: repo_url: https://github.com/mate-desktop/engrampa
author: Colomban Wendling
author_date: 2024-01-17 11:57:48+01:00
msg: Use unar instead of cpio for CPIO archives
repository: repo_url: https://github.com/mate-desktop/engrampa
repo_name: mate-desktop/engrampa
description: A file archiver for MATE
repo_language: C
owner: mate-desktop
file_changes: filename: fr-command-cpio.c
change_type: ModificationType.MODIFY
diff: @@ -219,7 +219,7 @@ fr_command_cpio_extract (FrCommand *comm,
 	fr_process_end_command (comm->process);
 }
 
-const char *cpio_mime_type[] = { "application/x-cpio", NULL };
+const char *cpio_mime_type[] = { /*"application/x-cpio",*/ NULL };
 
 static const char **
 fr_command_cpio_get_mime_types (FrCommand *comm)
@@ -235,8 +235,8 @@ fr_command_cpio_get_capabilities (FrCommand  *comm,
 	FrCommandCaps capabilities;
 
 	capabilities = FR_COMMAND_CAN_ARCHIVE_MANY_FILES;
-	if (is_program_available (CPIO_PATH, check_command))
-		capabilities |= FR_COMMAND_CAN_READ;
+/*	if (is_program_available (CPIO_PATH, check_command))
+		capabilities |= FR_COMMAND_CAN_READ;*/
 
 	return capabilities;
 }

programming_language: C
filename: fr-command-unarchiver.c
change_type: ModificationType.MODIFY
diff: @@ -247,6 +247,7 @@ fr_command_unarchiver_handle_error (FrCommand   *comm,
 const char *unarchiver_mime_type[] = { "application/zip",
 				       "application/x-cbr",
 				       "application/x-rar",
+				       "application/x-cpio",
 				       NULL };
 
 static const char **

programming_language: C