High Severity

ray

CSRF Leading to RCE via /api/job_agent/jobs/

A Cross-Site Request Forgery (CSRF) vulnerability in Ray version 2.9.1 allows attackers to achieve Remote Code Execution (RCE) by redirecting a user to a malicious website. The vulnerability stems from insufficient validation of user-generated requests, particularly through the /api/job_agent/jobs/ endpoint. This issue was not specified to be patched in the provided document, highlighting the need for manual intervention.

Available publicly on May 02 2024

8.8

CVE:

No CVE

CVSS:

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Credit:

ehtec
Threat Overview

The vulnerability arises when an attacker redirects a user to a malicious site that sends a POST request to the /api/job_agent/jobs/ endpoint on the Ray server. This endpoint, intended for internal use, lacks proper CSRF protections, allowing attackers to execute arbitrary code on the Ray cluster without the user's knowledge. The attack exploits the server's default configuration, which listens on all interfaces, thereby exposing it to the entire internal network. Additionally, the server reflects the Access-Control-Allow-Origin header from the request, enabling the attacker to bypass CORS policies and potentially read the response.

Attack Scenario

An attacker crafts a malicious website containing JavaScript code designed to send a POST request to the vulnerable Ray endpoint when visited by a user. The request includes a payload that executes arbitrary code on the Ray server. The user, upon visiting the attacker's website, unknowingly triggers the request, leading to unauthorized code execution on the Ray cluster. This scenario requires no further interaction from the user beyond visiting the malicious site.

Who is affected

Developers and organizations using Ray version 2.9.1, especially those running Ray clusters accessible within an internal network or on localhost, are vulnerable to this attack. The vulnerability can lead to unauthorized remote code execution, potentially compromising the security of the Ray cluster and the integrity of the organization's data and operations.

Technical Report
Want more out of Sightline?

Sightline offers even more for premium customers

Go Premium

We have 291 related security advisories that are available with Sightline Premium.