CVE-2023-6019
📋 TL;DR
This vulnerability allows unauthenticated remote attackers to execute arbitrary operating system commands on systems running vulnerable versions of Ray's dashboard. The command injection occurs via the cpu_profile URL parameter, enabling complete system compromise. All Ray deployments with the dashboard exposed are affected.
💻 Affected Systems
- Ray distributed computing framework
📦 What is this software?
Ray by Ray Project
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise leading to data exfiltration, ransomware deployment, lateral movement across networks, and complete loss of system integrity.
Likely Case
Remote code execution allowing attackers to install backdoors, mine cryptocurrency, or use the system as a pivot point for further attacks.
If Mitigated
Limited impact if dashboard is not internet-facing and proper network segmentation is in place, though internal attackers could still exploit.
🎯 Exploit Status
The vulnerability is simple to exploit with publicly available details. No authentication required makes weaponization straightforward.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 2.8.1 and later
Vendor Advisory: https://www.anyscale.com/blog/update-on-ray-cves-cve-2023-6019-cve-2023-6020-cve-2023-6021-cve-2023-48022-cve-2023-48023
Restart Required: Yes
Instructions:
1. Stop all Ray processes. 2. Upgrade Ray using pip: 'pip install --upgrade ray>=2.8.1'. 3. Restart Ray services. 4. Verify the dashboard is running the patched version.
🔧 Temporary Workarounds
Disable Ray Dashboard
allCompletely disable the Ray dashboard to remove the attack surface
ray start --head --dashboard-port=0
RAY_DASHBOARD_PORT=0 ray start --head
Network Restriction
linuxRestrict dashboard access to trusted IPs only using firewall rules
iptables -A INPUT -p tcp --dport 8265 -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 8265 -j DROP
🧯 If You Can't Patch
- Immediately restrict network access to Ray dashboard port (default 8265) using firewall rules
- Implement network segmentation to isolate Ray clusters from sensitive systems and internet
🔍 How to Verify
Check if Vulnerable:
Check if Ray version is below 2.8.1 and dashboard is accessible on port 8265
Check Version:
python -c "import ray; print(ray.__version__)"
Verify Fix Applied:
Confirm Ray version is 2.8.1 or higher and test dashboard functionality
📡 Detection & Monitoring
Log Indicators:
- Unusual commands executed via Ray dashboard
- Suspicious process creation from Ray dashboard process
- Failed authentication attempts if authentication was enabled
Network Indicators:
- Unusual outbound connections from Ray dashboard host
- Traffic to Ray dashboard port 8265 from unexpected sources
SIEM Query:
source="ray_dashboard.log" AND ("cpu_profile" OR "os.system" OR "subprocess")