In general case, it is not allowed to create files or soft links outside the decompression directory. However, by constructing multiple soft links with the same name to exploit two cycles of extracting, creating any soft link at any location pointing to any target file is possible. An poc is given , which shows that after executing tar to process the special file, the “rm”is hijacked.
Created attachment 9406 [details] the poc detail the poc detail. hack5.tar shows how to construct an tar to attack. runpoc.png shows the result after attacking