Exploiting Spring Cloud Function Sqel injection — With Metasploit
Spring Cloud Function versions before 3.1.7 and 3.2.3 are vulnerable to remote code execution through a SpEL injection, tracked as CVE-2022-22963. An attacker who can reach the routing expression endpoint could run commands on the server and obtain a shell.
Published on systemweakness.com
Spring Cloud Function is a popular open-source framework that allows developers to create serverless applications in a variety of programming languages. However, like any software, it’s not immune to vulnerabilities that could be exploited by attackers.
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 write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the routing expression supplied in the request was evaluated as a SpEL expression without sanitisation, allowing arbitrary code execution.
Impact
A successful exploit gives the attacker a shell on the target, which could lead to full compromise of the server.
What the attacker needed
Target runs vulnerable Spring Cloud Function; network access to the service; Metasploit installed
How it was found
- Confirm the target application depends on Spring Cloud Function.
- Start Metasploit with msfconsole.
- Select the spring_cloud_function_spel_injection exploit module.
- Set the target host and your listener host in the module options.
- Run the exploit.
- Receive a shell if the module succeeds, changing the payload if it fails.
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 write-up has not been written yet. The Original tab links to the source.
Spring Cloud Function is a Java library for building small serverless functions. It accepted a routing expression from the request and evaluated it as a SpEL expression, which is a small scripting language inside Java. Because the expression was evaluated, an attacker could make the server run their own commands instead of just routing a request.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.