# CVE-2021-36260: Hikvision Improper Input Validation

> Attackers can execute arbitrary commands on Hikvision devices via the web server due to insufficient input validation.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 10 Jan 2022 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 22 Sep 2021
- **Updated:** 21 Oct 2025
- **Also known as:** GHSA-v276-9v2g-hx55

## What is CVE-2021-36260?

CVE-2021-36260 is a critical command injection vulnerability in n/a, published on 22 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A command injection vulnerability in the web server of some Hikvision product. Due to the insufficient input validation, attacker can exploit the vulnerability to launch a command injection attack by sending some messages with malicious commands.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2021-36260?

It affects 256 products.


Products: Hikvision Ds-2cd2021g1-I\(w\) Firmware, Hikvision Ds-2cd2023g2-I\(u\) Firmware, Hikvision Ds-2cd2026g2-Iu\/Sl Firmware, Hikvision Ds-2cd2027g2-L\(u\) Firmware, Hikvision Ds-2cd2027g2-Lu\/Sl Firmware, Hikvision Ds-2cd2043g2-I\(u\) Firmware, Hikvision Ds-2cd2046g2-Iu\/Sl Firmware, Hikvision Ds-2cd2047g2-L\(u\) Firmware, Hikvision Ds-2cd2063g2-I\(u\) Firmware, Hikvision Ds-2cd2066g2-I\(u\) Firmware, Hikvision Ds-2cd2066g2-Iu\/Sl Firmware, Hikvision Ds-2cd2083g2-I\(u\) Firmware, Hikvision Ds-2cd2086g2-I\(u\) Firmware, Hikvision Ds-2cd2086g2-Iu\/Sl Firmware, Hikvision Ds-2cd2087g2-L\(u\) Firmware, Hikvision Ds-2cd2121g0-I\(w\)\(s\) Firmware, Hikvision Ds-2cd2121g1-I\(w\) Firmware, Hikvision Ds-2cd2121g1-Idw Firmware, Hikvision Ds-2cd2121g1 Firmware, Hikvision Ds-2cd2123g2-I\(s\) Firmware and 236 more.

## How do I fix CVE-2021-36260?

No fix has been published for CVE-2021-36260 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 24 Jan 2022.

## Is CVE-2021-36260 being exploited?

Yes. Attackers have exploited CVE-2021-36260 in the wild since at least 10 Jan 2022.

Public exploit code:

- HikvisionExploiter is a Python-based utility designed to automate exploitation and directory accessibility checks on Hikvision network cameras exploiting the Web interface Version 3.1.3.150324 + CVE-2021-36260 Detection (github_poc): https://github.com/tamim1089/HikvisionExploiter
- command injection vulnerability in the web server of some Hikvision product. Due to the insufficient input validation, attacker can exploit the vulnerability to launch a command injection attack by sending some messages with malicious commands. (github_poc): https://github.com/Aiminsun/CVE-2021-36260
- 海康威视RCE漏洞 批量检测和利用工具 (github_poc): https://github.com/Cuerz/CVE-2021-36260
- the metasploit script(POC) about CVE-2021-36260  (github_poc): https://github.com/TaroballzChen/CVE-2021-36260-metasploit
- CVE-2021-36260 (github_poc): https://github.com/rabbitsafe/CVE-2021-36260
- HIKRAVEN - Advanced Hikvision Security Assessment Platform for professional penetration testing. Detects 12+ CVEs including CVE-2021-36260 (CRITICAL), tests default credentials, performs network discovery, and generates professional security reports. For authorized security testing only! 🛡️🔒 (github_poc): https://github.com/sylhetyhackvenger/HIKRAVEN

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-36260 and fix it if it is affected.

What it is: CVE-2021-36260 is a critical command injection vulnerability in n/a, published on 22 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-36260 in the wild since at least 10 Jan 2022.

Affected product: n/a. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-36260/ (Markdown: https://insights.sbomify.com/CVE-2021-36260/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-36260
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-36260
- OSV: https://osv.dev/vulnerability/CVE-2021-36260

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-36260/
Summaries are generated and may contain mistakes; the official description above is the record.
