From 8b3d79910421d93e3db4415e6f8f9fef7965f69d Mon Sep 17 00:00:00 2001 From: Ryuuuuu <33323678+Ryuuuuu@users.noreply.github.com> Date: Tue, 4 Apr 2023 10:07:06 +0900 Subject: [PATCH 1/2] fix check function which always prints vulnerable --- modules/exploits/linux/http/apache_couchdb_cmd_exec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb b/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb index 2b6fcd43b4..c7296f7c23 100644 --- a/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb +++ b/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb @@ -69,6 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote def check get_version + return CheckCode::Unknown if @version < 0 version = Rex::Version.new(@version) return CheckCode::Unknown if version.version.empty? vprint_status "Found CouchDB version #{version}" From 9985538846f7d5a52f45bce029e34b8b2503ebd0 Mon Sep 17 00:00:00 2001 From: Ryuuuuu <33323678+Ryuuuuu@users.noreply.github.com> Date: Fri, 7 Apr 2023 09:55:00 +0900 Subject: [PATCH 2/2] Update modules/exploits/linux/http/apache_couchdb_cmd_exec.rb fix nil exception Co-authored-by: adfoster-r7 <60357436+adfoster-r7@users.noreply.github.com> --- modules/exploits/linux/http/apache_couchdb_cmd_exec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb b/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb index c7296f7c23..d438aa30f1 100644 --- a/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb +++ b/modules/exploits/linux/http/apache_couchdb_cmd_exec.rb @@ -69,7 +69,7 @@ class MetasploitModule < Msf::Exploit::Remote def check get_version - return CheckCode::Unknown if @version < 0 + return CheckCode::Unknown if @version.nil? version = Rex::Version.new(@version) return CheckCode::Unknown if version.version.empty? vprint_status "Found CouchDB version #{version}"