Rapid7 Vulnerability & Exploit Database

Spring Cloud Function SpEL Injection

Back to Search

Spring Cloud Function SpEL Injection

Disclosed
03/29/2022
Created
03/31/2022

Description

Spring Cloud Function versions prior to 3.1.7 and 3.2.3 are vulnerable to remote code execution due to using an unsafe evaluation context with user-provided queries. By crafting a request to the application and setting the spring.cloud.function.routing-expression header, an unauthenticated attacker can gain remote code execution. Both patched and unpatched servers will respond with a 500 server error and a JSON encoded message.

Author(s)

  • m09u3r
  • hktalent
  • Spencer McIntyre

Platform

Linux,Unix

Architectures

cmd, x86, x64

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/multi/http/spring_cloud_function_spel_injection
msf exploit(spring_cloud_function_spel_injection) > show targets
    ...targets...
msf exploit(spring_cloud_function_spel_injection) > set TARGET < target-id >
msf exploit(spring_cloud_function_spel_injection) > show options
    ...show and set options...
msf exploit(spring_cloud_function_spel_injection) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;