VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check) - Nessus

Critical   Plugin ID: 159730

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

Plugin Overview


ID: 159730
Name: VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check)
Filename: spring_CVE-2022-22963_local.nasl
Vulnerability Published: 2022-03-28
This Plugin Published: 2022-04-14
Last Modification Time: 2022-04-26
Plugin Version: 1.2
Plugin Type: local
Plugin Family: Misc.
Dependencies: vmware_spring_cloud_function_installed.nbin

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): N/A
Exploit Available: True (Metasploit Framework, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local 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


This is the spring_CVE-2022-22963_local.nasl nessus plugin source code. This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
##
# (C) Tenable Network Security, Inc.
##

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(159730);
  script_version("1.2");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/26");

  script_cve_id("CVE-2022-22963");

  script_name(english:"VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check)");

  script_set_attribute(attribute:"synopsis", value:
"Spring Cloud Function running on the remote host is affected by a remote code execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"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.");
  script_set_attribute(attribute:"see_also", value:"https://tanzu.vmware.com/security/cve-2022-22963");
  # https://nsfocusglobal.com/spring-cloud-function-spel-expression-injection-vulnerability-alert
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?93cb5cd5");
  script_set_attribute(attribute:"see_also", value:"https://github.com/hktalent/spring-spel-0day-poc");
  script_set_attribute(attribute:"solution", value:
"Upgrade to Spring Cloud Function version 3.1.7 or 3.2.3 or later.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2022-22963");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Spring Cloud Function SpEL Injection');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2022/03/28");
  script_set_attribute(attribute:"patch_publication_date", value:"2022/03/29");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/04/14");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:vmware:spring_cloud_function");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

  script_copyright(english:"This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("vmware_spring_cloud_function_installed.nbin");

  exit(0);
}

include('vcf.inc');

var app_info = vcf::get_app_info(app:'Spring Cloud Function');

var constraints = [
  {'fixed_version' : '3.1.7'},
  {'min_version' : '3.2', 'fixed_version' : '3.2.3'}
];

vcf::check_version_and_report(app_info:app_info, constraints:constraints, severity:SECURITY_HOLE);

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

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

Go back to menu.

How to Run


Here is how to run the VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local 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 Misc. plugin family.
  6. On the right side table select VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check) plugin ID 159730.
  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_CVE-2022-22963_local.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a spring_CVE-2022-22963_local.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - spring_CVE-2022-22963_local.nasl -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_CVE-2022-22963_local.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 159375 - Spring Cloud Function SPEL Expression Injection (direct 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)
  • 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
  • 119846 - Spring Framework 4.3.x < 4.3.15 / 5.0.x < 5.0.5 Windows Directory Traversal Vulnerability (CVE-2018-1271)
  • 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)
  • 159542 - Spring Framework Spring4Shell (CVE-2022-22965)
  • 50695 - Novell GroupWise WebAccess Arbitrary File Download (local check)
  • 87209 - Oracle WebLogic Server Java Object Deserialization RCE (Local Check)

Version


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

Go back to menu.