From cf7096f8ba899a93c254f9e83417865257681d1a Mon Sep 17 00:00:00 2001 From: Sonny Gonzalez Date: Mon, 15 Apr 2019 16:35:15 -0500 Subject: [PATCH] Target path normalization fixed --- lib/msf/core/db_manager/import/metasploit_framework/zip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/msf/core/db_manager/import/metasploit_framework/zip.rb b/lib/msf/core/db_manager/import/metasploit_framework/zip.rb index 6c722ad72c..f0c8202708 100644 --- a/lib/msf/core/db_manager/import/metasploit_framework/zip.rb +++ b/lib/msf/core/db_manager/import/metasploit_framework/zip.rb @@ -195,7 +195,7 @@ module Msf::DBManager::Import::MetasploitFramework::Zip data.entries.each do |e| # normalize entry name to an absolute path - target = File.expand_path(@import_filedata[:zip_tmp] + e.name, '/').to_s + target = File.expand_path(File.join(@import_filedata[:zip_tmp], e.name), '/').to_s # skip if the target would be extracted outside of the zip # tmp dir to mitigate any directory traversal attacks