HexBrain

Browse / CVEs / CVE-2021-24891

CVE-2021-24891· elementor / website builder· CWE-79

WordPress Elementor Website Builder <3.1.4 - Cross-Site Scripting

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

WordPress Elementor Website Builder plugin before 3.1.4 contains a DOM cross-site scripting vulnerability. It does not sanitize or escape user input appended to the DOM via a malicious hash.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential data theft, session hijacking, or defacement of the affected website.

Fix

Update WordPress Elementor Website Builder to version 3.1.4 or later to mitigate this vulnerability.

How to confirm it

Send: GET /wp-content/plugins/elementor/readme.txt
Positive when: contains "Elementor Website Builder" or "Elementor Page Builder"
Send: GET {{BaseURL}}/wp-content/plugins/elementor/assets/js/frontend.min.js
Positive when: compare_versions(version, '> 1.5.0', '< 3.1.4') AND matches /elementor[\s-]*v(([0-3]+\.(([0-5]+\.[0-5]+)|[0-4]+\.[0-9]+))|[0-2]+[0-9.]+)/

Run it with nuclei: nuclei -id CVE-2021-24891 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2021-24891

info:
  name: WordPress Elementor Website Builder <3.1.4 - Cross-Site Scripting
  author: dhiyaneshDk
  severity: medium
  description: |
    WordPress Elementor Website Builder plugin before 3.1.4 contains a DOM cross-site scripting vulnerability. It does not sanitize or escape user input appended to the DOM via a malicious hash.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary JavaScript code in the context of the victim's browser, leading to potential data theft, session hijacking, or defacement of the affected website.
  remediation: |
    Update WordPress Elementor Website Builder to version 3.1.4 or later to mitigate this vulnerability.
  reference:
    - https://www.jbelamor.com/xss-elementor-lightox.html
    - https://wpscan.com/vulnerability/fbed0daa-007d-4f91-8d87-4bca7781de2d
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24891
    - https://github.com/ARPSyndicate/kenzer-templates
  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-24891
    cwe-id: CWE-79
    epss-score: 0.28862
    epss-percentile: 0.98168
    cpe: cpe:2.3:a:elementor:website_builder:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 3
    vendor: elementor
    product: "website_builder"
    framework: wordpress
  tags: cve2021,cve,wordpress,wp-plugin,elementor,wpscan,dom,xss,passive,vuln
flow: http(1) && http(2)

http:
  - raw:
      - |
        GET /wp-content/plugins/elementor/readme.txt HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: word
        words:
          - 'Elementor Website Builder'
          - 'Elementor Page Builder'
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/wp-content/plugins/elementor/assets/js/frontend.min.js"

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - compare_versions(version, '> 1.5.0', '< 3.1.4')

      - type: regex
        part: body
        regex:
          - "elementor[\\s-]*v(([0-3]+\\.(([0-5]+\\.[0-5]+)|[0-4]+\\.[0-9]+))|[0-2]+[0-9.]+)"

    extractors:
      - type: regex
        name: version
        group: 1
        regex:
          - "elementor[\\s-]*v(([0-3]+\\.(([0-5]+\\.[0-5]+)|[0-4]+\\.[0-9]+))|[0-2]+[0-9.]+)"
        internal: true

      - type: kval
        kval:
          - version

References

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