Spring Cloud Function SPEL Expression Injection (direct check) - Nessus

Critical   Plugin ID: 159375

This page contains detailed information about the Spring Cloud Function SPEL Expression Injection (direct check) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 159375
Name: Spring Cloud Function SPEL Expression Injection (direct check)
Filename: spring_cloud_CVE-2022-22963.nbin
Vulnerability Published: 2022-03-28
This Plugin Published: 2022-03-31
Last Modification Time: 2022-05-03
Plugin Version: 1.5
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: http_version.nasl, webmirror.nasl
Excluded KB Items [?]: Settings/disable_cgi_scanning

Vulnerability Information


Severity: Critical
Vulnerability Published: 2022-03-28
Patch Published: 2022-03-29
CVE [?]: CVE-2022-22963
CPE [?]: cpe:/a:vmware:spring_cloud_function

Synopsis

Spring Cloud Function running on the remote host is affected by a remote code execution vulnerability.

Description

The version of Spring Cloud Function running on the remote host is affected by a remote code execution vulnerability in the routing functionality. A remote, unauthenticated attacker could provide a specially crafted SpEL as a routing expression that may result in remote code execution on the remote host.

Solution

Upgrade to Spring Cloud Function version 3.1.7 or 3.2.3 or later.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Spring Cloud Function SPEL Expression Injection (direct check) vulnerability:

  1. Metasploit: exploit/multi/http/spring_cloud_function_spel_injection
    [Spring Cloud Function SpEL Injection]
  2. GitHub: https://github.com/AayushmanThapaMagar/CVE-2022-22963
    [CVE-2022-22963: POC for CVE-2022-22963]
  3. GitHub: https://github.com/JDierberger1/CVE-2022-22965-JAR-SCA-POC
    [CVE-2022-22963: Proof-of-Concept for CVE-2022-22965 exploitation on a self-contained .JAR file built ...]
  4. GitHub: https://github.com/Kirill89/CVE-2022-22963-PoC
    [CVE-2022-22963]
  5. GitHub: https://github.com/RanDengShiFu/CVE-2022-22963
    [CVE-2022-22963: CVE-2022-22963 Spring-Cloud-Function-SpEL_RCE_exploit]
  6. GitHub: https://github.com/SealPaPaPa/SpringCloudFunction-Research
    [CVE-2022-22963: CVE-2022-22963 research]
  7. GitHub: https://github.com/TheGejr/SpringShell
    [CVE-2022-22963: Spring Core RCE CVE-2022-22963]
  8. GitHub: https://github.com/darryk10/CVE-2022-22963
    [CVE-2022-22963]
  9. GitHub: https://github.com/dinosn/CVE-2022-22963
    [CVE-2022-22963: CVE-2022-22963 PoC]
  10. GitHub: https://github.com/exploitbin/CVE-2022-22963-Spring-Core-RCE
    [CVE-2022-22963: A Proof-of-Concept (PoC) of the Spring Core RCE (Spring4Shell or CVE-2022-22963) in ...]
  11. GitHub: https://github.com/k3rwin/spring-cloud-function-rce
    [CVE-2022-22963: Spring Cloud Function SPEL表达式注入漏洞(CVE-2022-22963)]
  12. GitHub: https://github.com/kh4sh3i/Spring-CVE
    [CVE-2022-22963: This includes CVE-2022-22963, a Spring SpEL / Expression Resource Access ...]
  13. GitHub: https://github.com/me2nuk/CVE-2022-22963
    [CVE-2022-22963: Spring Cloud Function Vulnerable Application / CVE-2022-22963]
  14. GitHub: https://github.com/mebibite/springhound
    [CVE-2022-22963: Created after the release of CVE-2022-22965 and CVE-2022-22963. Bash script that ...]
  15. GitHub: https://github.com/puckiestyle/CVE-2022-22963
    [CVE-2022-22963]
  16. GitHub: https://github.com/stevemats/Spring0DayCoreExploit
    [CVE-2022-22963: { Spring Core 0day CVE-2022-22963 }]
  17. GitHub: https://github.com/twseptian/cve-2022-22963
    [CVE-2022-22963: Spring Cloud Function SpEL - cve-2022-22963]
  18. GitHub: https://github.com/hktalent/spring-spel-0day-poc
    [CVE-2022-22963: Spring-cloud / ...]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2022-22963
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


The spring_cloud_CVE-2022-22963.nbin Nessus plugin is distributed in a propriatory binary format and its source code is protected. This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/spring_cloud_CVE-2022-22963.nbin
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\spring_cloud_CVE-2022-22963.nbin
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/spring_cloud_CVE-2022-22963.nbin

Go back to menu.

How to Run


Here is how to run the Spring Cloud Function SPEL Expression Injection (direct check) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select Spring Cloud Function SPEL Expression Injection (direct check) plugin ID 159375.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl spring_cloud_CVE-2022-22963.nbin -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a spring_cloud_CVE-2022-22963.nbin -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - spring_cloud_CVE-2022-22963.nbin -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state spring_cloud_CVE-2022-22963.nbin -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 159730 - VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check)
  • 129500 - Spring Framework 4.3.x < 4.3.16 / 5.0.x < 5.0.5 Remote Code Execution with spring-messaging (CVE-2018-1270)
  • 119846 - Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271)
  • 133148 - Spring Framework 5.0.x < 5.0.16 / 5.1.x < 5.1.13 / 5.2.x < 5.2.3 Spring Framework Reflected File Download Vulnerability. (CVE-2020-5398)
  • 159374 - Spring Framework < 5.2.20 / 5.3.x < 5.3.18 Remote Code Execution (CVE-2022-22965)
  • 160544 - Spring Data Commons < 1.13.11 / 2.x < 2.0.6 RCE
  • 159542 - Spring Framework Spring4Shell (CVE-2022-22965)
  • 126653 - Debian DLA-1853-1 : libspring-java security update
  • 149004 - Debian DLA-2635-1 : libspring-java security update
  • 73255 - Debian DSA-2890-1 : libspring-java - security update
  • 129973 - Oracle GoldenGate for Big Data 12.3.1.1.x < 12.3.1.1.6 / 12.3.2.1.x < 12.3.2.1.5 Spring Framework DoS (Oct 2019 CPU)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file spring_cloud_CVE-2022-22963.nbin version 1.5. For more plugins, visit the Nessus Plugin Library.

Go back to menu.