CVE-2023-6021: Ray: LFI allows unauthenticated file read
GHSA-3pww-qvr8-6mhp CRITICAL PoC AVAILABLE NUCLEI TEMPLATE CISA: TRACK*Any Ray cluster reachable over the network is critically exposed — no credentials required to read arbitrary server files including API keys, cloud credentials, and model artifacts. With an EPSS of 0.87, exploitation is highly probable and likely active. Patch to Ray 2.8.1+ immediately; if patching is blocked, isolate Ray nodes from public networks and treat all secrets stored on Ray nodes as compromised.
Risk Assessment
Critical. CVSS 9.3 (network-accessible, no auth, no user interaction, high confidentiality impact) combined with EPSS 0.87317 signals active or near-certain exploitation in the wild. Ray clusters are common in cloud ML environments and frequently misconfigured with port 8265 or 8000 exposed. AI/ML infrastructure is a high-value target due to the concentration of credentials, proprietary models, and sensitive training data on compute nodes.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| ray | pip | < 2.8.1 | 2.8.1 |
Do you use ray? You're affected.
Severity & Risk
Attack Surface
Recommended Action
6 steps-
Patch immediately: upgrade to Ray 2.8.1+.
-
If patching is blocked, restrict network access to Ray ports (8265, 8000, 6379, 10001) via firewall — these must never be internet-facing.
-
Assume compromise if Ray was network-accessible before patching: rotate all credentials stored on Ray nodes (cloud keys, API tokens, SSH keys, DB passwords).
-
Enable access logging on Ray endpoints and alert on path traversal patterns (../, ..\, %2e%2e%2f).
-
Deploy Ray behind an authenticated reverse proxy if network isolation is not immediately feasible.
-
Audit Ray node filesystems for secrets using tools like truffleHog or gitleaks.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2023-6021?
Any Ray cluster reachable over the network is critically exposed — no credentials required to read arbitrary server files including API keys, cloud credentials, and model artifacts. With an EPSS of 0.87, exploitation is highly probable and likely active. Patch to Ray 2.8.1+ immediately; if patching is blocked, isolate Ray nodes from public networks and treat all secrets stored on Ray nodes as compromised.
Is CVE-2023-6021 actively exploited?
Proof-of-concept exploit code is publicly available for CVE-2023-6021, increasing the risk of exploitation.
How to fix CVE-2023-6021?
1. Patch immediately: upgrade to Ray 2.8.1+. 2. If patching is blocked, restrict network access to Ray ports (8265, 8000, 6379, 10001) via firewall — these must never be internet-facing. 3. Assume compromise if Ray was network-accessible before patching: rotate all credentials stored on Ray nodes (cloud keys, API tokens, SSH keys, DB passwords). 4. Enable access logging on Ray endpoints and alert on path traversal patterns (../, ..\, %2e%2e%2f). 5. Deploy Ray behind an authenticated reverse proxy if network isolation is not immediately feasible. 6. Audit Ray node filesystems for secrets using tools like truffleHog or gitleaks.
What systems are affected by CVE-2023-6021?
This vulnerability affects the following AI/ML architecture patterns: distributed training pipelines, model serving, hyperparameter tuning, reinforcement learning environments, MLOps pipelines.
What is the CVSS score for CVE-2023-6021?
CVE-2023-6021 has a CVSS v3.1 base score of 9.3 (CRITICAL). The EPSS exploitation probability is 87.32%.
Technical Details
NVD Description
LFI in Ray's log API endpoint allows attackers to read any file on the server 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
Exploitation Scenario
Adversary scans internet-facing hosts for Ray dashboard (port 8265) or Ray Serve (port 8000) — both commonly exposed in misconfigured cloud ML environments. Once a Ray instance is identified, attacker sends a crafted GET request to the log API endpoint with a path traversal payload targeting high-value files: ../../../../root/.env (API keys), ../../../../home/ubuntu/.aws/credentials (cloud access), ../../../../root/.ssh/id_rsa (SSH private key). With credentials harvested, attacker pivots from the ML cluster to broader cloud infrastructure, CI/CD pipelines, or model registries. EPSS of 0.87 indicates this exploit pattern is already operational.
Weaknesses (CWE)
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N References
Timeline
Scanner Template Available
A Nuclei vulnerability scanner template exists for this CVE. You can scan your infrastructure for this vulnerability immediately.
View template on GitHubnuclei -t http/cves/2023/CVE-2023-6021.yaml -u https://target.example.com Related Vulnerabilities
CVE-2023-6019 9.8 Ray: unauthenticated RCE via dashboard command injection
Same package: ray CVE-2023-48022 9.8 Ray: unauthenticated RCE via job submission API
Same package: ray CVE-2023-6020 9.3 Ray: unauthenticated LFI exposes entire filesystem
Same package: ray CVE-2025-1979 6.4 Ray: Redis password exposed via plaintext logging
Same package: ray CVE-2026-27482 5.9 ray: Missing Auth allows unauthenticated access
Same package: ray
AI Threat Alert