diff --git a/modules/exploits/multi/http/gitea_git_hooks_rce.rb b/modules/exploits/multi/http/gitea_git_hooks_rce.rb index ca580545e8dbc..384bc5cb7327d 100644 --- a/modules/exploits/multi/http/gitea_git_hooks_rce.rb +++ b/modules/exploits/multi/http/gitea_git_hooks_rce.rb @@ -131,8 +131,12 @@ def check end # Powered by Gitea Version: 1.12.5 - unless (match = res.body.match(/Powered by Gitea Version: (?[\d.]+)/)) - return CheckCode::Unsupported('Target does not appear to be running Gitea.') + unless (match = res.body.match(/Gitea Version: (?[\da-zA-Z.]+)/)) + return CheckCode::Unknown('Target does not appear to be running Gitea.') + end + + if match[:version].match /[a-zA-Z]/ + return CheckCode::Unknown("Unknown Gitea version #{match[:version]}.") end if Rex::Version.new(match[:version]) >= Rex::Version.new('1.13.0')