A now-patched vulnerability in Oracle Cloud Infrastructure’s (OCI) Code Editor exposed users to remote code execution (RCE) attacks with just a single click.
Discovered by Tenable Research, the flaw could allow attackers to upload malicious files to a victim’s Cloud Shell environment and potentially pivot to broader services. According to the researchers, the culprit was a poorly guarded file upload endpoint hidden inside a browser-based IDE.
“The attack happens through a victim logged into OCI visiting a malicious link,” said Liv Matan, senior cloud security researcher, Tenable. “It reinforces the need to treat browser-based development tools with the same security scrutiny as production systems.”
While a CVE ID and severity rating haven’t been issued yet, Matan said it was brought to Oracle’s notice and was swiftly remediated by the company.
CSRF oversight leading to RCE
OCI’s Code Editor, a web-based IDE built for managing resources like Functions, Resource Manager, and Data Science, was designed for seamless developer workflows. But it’s tight integration with Cloud Shell, Oracle’s browser-based command-line environment, that shares session context, file systems, and runtime environment, created the exposure.
Tenable researchers found that while Cloud Shell’s direct upload mechanism played by the rules, Code Editor quietly exposed a file upload endpoint, lacking cross-site request forgery (CSRF) protections.
“The attacker’s page sends a silent POST request to the vulnerable file-upload endpoint in Code Editor,” Matan said. “ This places a crafted file into Cloud Shell. When the victim launches Cloud Shell, the file is executed, leading to remote code execution.”
The permissiveness likely stemmed from an architectural trust assumption, Matan added.
Attacks could have a wider blast radius
Because Code Editor operates on the same underlying file system as the Cloud Shell — essentially a Linux home directory in the cloud, attackers could tamper with files used by other integrated services. This turns the flaw in the seemingly contained developer tool into an exposure for lateral movement across the OCI landscape.
“In practice, this could involve leveraging the victim’s active session and credentials to access other OCI resources by impersonating the attached cloud identity,” Matan pointed out. “The blast radius of such an attack depends on the permissions of the compromised identity.”
The nature of the Code Editor integrations can allow an attacker more attack primitives, such as modifying functions, accessing Resource Manager stacks, or injecting code into Data Science notebooks, depending on the victim’s environment, Matan added.
Because Cloud Shell is pre-authenticated with the user’s identity and shares session state, it’s considered privileged. Any code executed in this environment has the same level of access as the logged-in user, making it a tempting target for attackers.
Matan noted that detection of this exploit would be challenging without specific auditing on file changes or unusual CLI behavior. However, enhanced logging around unexpected uploads could help identify anomalous activity early.
While Oracle did not immediately respond to CSO’s request for comments, the disclosure added that Oracle’s fix came in the form of a CSRF token requirement. This was enforced via a custom HTTP header that browsers can’t spoof in cross-origin requests, the researchers said.
No Responses