CVE DatabaseCVE-2021-40407
한국어 권고문 →
CVE-2021-404077.2/HIGHCISA KEVCWE-78CWE-78

Reolink RLC-410W IP Camera SetDdns API OS Command Injection Vulnerability (CVE-2021-40407) Analysis and Mitigation Guide

⚡ Jump to Patch
Affected Vendors
reolink
Affected Components
rlc-410w
Published Date
2022-01-28
CVSS v3.1
7.2
HIGH
EPSS (30d)
47.6%
FIRST.org
CISA KEV
Exploited

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

Reolink RLC-410W smart IP camera firmware version v3.0.0.136_20121102 and prior

Impact

An authenticated attacker can execute arbitrary OS commands with root privileges by sending a crafted HTTP request, leading to complete device compromise

Mitigation

Immediately update to the latest official secure firmware and restrict external access to the camera management interface

Affected Products & Version Scope

Reolink RLC-410W IP camera firmware version v3.0.0.136_20121102 and earlier

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Official Patch & Version Upgrade Commands

Download the latest secure firmware from the official Reolink Download Center. You can verify the current firmware version of your device using the following API query command:

bash
# Query the camera API to retrieve system information and verify the firmware version
curl -s -k -X POST -d '[{"cmd":"GetAbility","action":0,"param":{}}]' \
  'https://<CAMERA_IP>/cgi-bin/api.cgi?user=admin&password=<PASSWORD>' \
  | grep -i 'firmware'

2. Temporary Workaround & Hardening Configuration

If immediate patching is not feasible, isolate the camera from the public internet and restrict access to the management ports (HTTP/HTTPS, RTSP). Below is an example of iptables rules to restrict access to trusted administrative subnets only:

bash
# Block all public access to the camera web ports (80, 443)
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP

# Allow access only from a trusted management subnet (e.g., 192.168.1.0/24)
iptables -I INPUT -s 192.168.1.0/24 -p tcp --dport 80 -j ACCEPT
iptables -I INPUT -s 192.168.1.0/24 -p tcp --dport 443 -j ACCEPT

3. Log Audit & IoC Verification Commands

Monitor network traffic and web server logs for suspicious SetDdns API requests containing shell metacharacters. Use the following command to scan access logs for potential exploitation attempts:

bash
# Scan web server access logs for SetDdns requests containing shell metacharacters
grep -E 'SetDdns' /var/log/nginx/access.log | grep -E '(%3B|%26|%7C|%60|;|\&|\||`)'
Interactive SecOps Remediation Checklist
0/4 (0%)
Recommended Security Control & Mitigation Partner
SentinelOne Singularity AI EDR
Due to active exploitation in the wild (CISA KEV), immediately isolate affected Reolink devices and apply the latest firmware updates.

Block Kernel Privilege Escalation & Ransomware Payloads Before You Can Reboot

Protect unpatched Windows, Linux, and macOS workloads against in-memory exploitation and lateral movement with autonomous EDR.

100% MITRE ATT&CK Detection · 1-Click Rollback

Technical Root Cause & Exploitation Mechanics

1. Vulnerability Overview & Root Cause

An OS command injection vulnerability (CVE-2021-40407) exists in the device network settings functionality of the Reolink RLC-410W IP camera. The root cause lies in the improper validation of the domain parameter supplied via the SetDdns API. The value is stored in the ddns->domain variable and subsequently executed within a system shell context without adequate sanitization, allowing malicious shell metacharacters to be processed.

2. Exploitation Mechanics & Attack Scenario

To exploit this vulnerability, an attacker must first obtain authenticated access to the camera's web management interface or API. The attacker then transmits a specially crafted HTTP POST request targeting the SetDdns API. By embedding shell metacharacters (such as ;, &, or ` `) along with arbitrary Linux commands inside the domain` parameter, the attacker forces the underlying operating system to execute the injected commands under root privileges.

3. Infrastructure & Business Impact

This vulnerability is rated CVSS 7.2 (High) and is listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, indicating active exploitation in the wild. Successful exploitation allows threat actors to hijack video streams, recruit the device into IoT botnets for DDoS campaigns, or use the compromised camera as a pivot point to compromise the internal corporate network.

Official Vendor Advisories & References

NVD Original English Description

An OS command injection vulnerability exists in the device network settings functionality of reolink RLC-410W v3.0.0.136_20121102. At [1] or [2], based on DDNS type, the ddns->domain variable, that has the value of the domain parameter provided through the SetDdns API, is not validated properly. This would lead to an OS command injection. An attacker can send an HTTP request to trigger this vulnerability.

Frequently Asked SecOps Questions (CVE-2021-40407)

FAQ

Q1. How critical is CVE-2021-40407 and is it actively exploited in the wild?

CVE-2021-40407 is rated CVSS 7.2 (HIGH) with a 30-day EPSS exploitation probability of 47.6%. It is listed in the CISA Known Exploited Vulnerabilities (KEV) catalog, requiring immediate emergency remediation.

Q2. Which vendors and products are affected by CVE-2021-40407?

Primary impacted vendors include reolink across rlc-410w. Scope summary: Reolink RLC-410W IP camera firmware version v3.0.0.136_20121102 and earlier

Q3. What temporary mitigations or workarounds exist for CVE-2021-40407 before patching?

[Mitigation] Immediately update to the latest official secure firmware and restrict external access to the camera management interface Follow the CLI remediation commands and interactive SecOps checklist on this page to restrict exposure prior to your maintenance window.

SECOPS WORKBENCH INTEGRATION

Generate an Internal Engineering Notice or CISO Report for CVE-2021-40407

Instantly format this advisory into an executive CISO summary or engineering patch ticket.

Generate Report →

🔗 Related Advisories in Similar Stack (reolink)

View Category →
SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed:
PatchKO
CVE-2021-40407 Reolink RLC-410W IP Camera SetDdns API OS Command Injection Vulnerability (CVE-2021-40407) Analysis and Mitigation Guide (CVSS 7.2) - Patch & Workaround | CVE Pulse