GHSL-2024-098: Authenticated remote code execution in Elektra - CVE-2024-41961
An authenticated user could inject Ruby code into the live search term, which was then executed by an eval sink, leading to remote code execution. Attackers could also send links with malicious payloads to authenticated users to trigger code execution.
Elektra from SAP’s Converged Cloud org was susceptible to a remote code execution vulnerability. Authenticated users were able to execute arbitrary code in the context of Elektra and through this potentially access remote systems to which they would have had no access otherwise.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The application used eval on a string built from user input without proper sanitisation, allowing code injection.
Impact
This issue may lead to Remote Code Execution (RCE), allowing attackers to execute arbitrary code and potentially access remote systems.
What the attacker needed
Authenticated user
The fix
The issue was fixed on main.
How it was found
- Authenticate to the Elektra web application.
- Send a request to the live search endpoint with a crafted term parameter containing Ruby code.
- The server executes the injected code via eval.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
The application took a search term from the user and inserted it directly into a piece of Ruby code that it then ran. Because the user could control part of that code, they could make the application run any Ruby command they wanted, which is called remote code execution. This is dangerous because it lets an attacker run their own code on the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.