Spring Framework Spring4Shell (CVE-2022-22965) - Nessus

Critical   Plugin ID: 159542

This page contains detailed information about the Spring Framework Spring4Shell (CVE-2022-22965) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 159542
Name: Spring Framework Spring4Shell (CVE-2022-22965)
Filename: spring4shell.nbin
Vulnerability Published: 2022-03-31
This Plugin Published: 2022-04-06
Last Modification Time: 2022-05-03
Plugin Version: 1.5
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: http_version.nasl
Excluded KB Items [?]: Settings/disable_cgi_scanning

Vulnerability Information


Severity: Critical
Vulnerability Published: 2022-03-31
Patch Published: 2022-03-31
CVE [?]: CVE-2022-22965
CPE [?]: cpe:/a:pivotal_software:spring_framework, cpe:/a:vmware:spring_framework
Exploited by Malware: True

Synopsis

The remote host contains a web application framework library that is affected by a remote code execution vulnerability.

Description

The remote host contains a Spring Framework library version that is prior to 5.2.20 or 5.3.x prior to 5.3.18. It is, therefore, affected by a remote code execution vulnerability: - A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it. - These are the prerequisites for the exploit: - JDK 9 or higher - Apache Tomcat as the Servlet container - Packaged as WAR - spring-webmvc or spring-webflux dependency

Solution

Upgrade to Spring Framework version 5.2.20 or 5.3.18 or later.

Public Exploits


Target Network Port(s): 8080
Target Asset(s): Services/www
Exploit Available: True (GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Spring Framework Spring4Shell (CVE-2022-22965) vulnerability:

  1. GitHub: https://github.com/4nth0ny1130/spring4shell_behinder
    [CVE-2022-22965: CVE-2022-22965写入冰蝎webshell脚本]
  2. GitHub: https://github.com/Axx8/SpringFramework_CVE-2022-22965_RCE
    [CVE-2022-22965: SpringFramework 远程代码执行漏洞CVE-2022-22965]
  3. GitHub: https://github.com/Axx8/SpringFramework_RCE_CVE-2022-22965
    [CVE-2022-22965: SpringFramework 远程代码执行漏洞CVE-2022-22965]
  4. GitHub: https://github.com/CalumHutton/CVE-2022-22965-PoC_Payara
    [CVE-2022-22965]
  5. GitHub: https://github.com/DDuarte/springshell-rce-poc
    [CVE-2022-22965: CVE-2022-22965 - CVE-2010-1622 redux]
  6. GitHub: https://github.com/Enokiy/spring-RCE-CVE-2022-22965
    [CVE-2022-22965]
  7. GitHub: https://github.com/FourCoreLabs/spring4shell-exploit-poc
    [CVE-2022-22965: Exploit a vulnerable Spring application with the Spring4Shell (CVE-2022-22965) ...]
  8. GitHub: https://github.com/JDierberger1/CVE-2022-22965-JAR-SCA-POC
    [CVE-2022-22965: Proof-of-Concept for CVE-2022-22965 exploitation on a self-contained .JAR file built ...]
  9. GitHub: https://github.com/Joe1sn/CVE-2022-22965
    [CVE-2022-22965: CVE-2022-22965 Environment]
  10. GitHub: https://github.com/Kirill89/CVE-2022-22965-PoC
    [CVE-2022-22965]
  11. GitHub: https://github.com/Loneyers/Spring4Shell
    [CVE-2022-22965: Spring4Shell , Spring Framework RCE (CVE-2022-22965) , Burpsuite Plugin]
  12. GitHub: https://github.com/LudovicPatho/CVE-2022-22965_Spring4Shell
    [CVE-2022-22965: A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to ...]
  13. GitHub: https://github.com/Mr-xn/spring-core-rce
    [CVE-2022-22965: CVE-2022-22965 : about spring core rce]
  14. GitHub: https://github.com/Snip3R69/spring-shell-vuln
    [CVE-2022-22965: Spring has Confirmed the RCE in Spring Framework. The team has just published the ...]
  15. GitHub: https://github.com/TheGejr/SpringShell
    [CVE-2022-22965: Spring4Shell - Spring Core RCE - CVE-2022-22965]
  16. GitHub: https://github.com/Will-Beninger/CVE-2022-22965_SpringShell
    [CVE-2022-22965]
  17. GitHub: https://github.com/alt3kx/CVE-2022-22965
    [CVE-2022-22965: Spring Framework RCE (CVE-2022-22965) Nmap (NSE) Checker (Non-Intrusive)]
  18. GitHub: https://github.com/alt3kx/CVE-2022-22965_PoC
    [CVE-2022-22965: Spring Framework RCE (Quick pentest notes)]
  19. GitHub: https://github.com/anair-it/springshell-vuln-POC
    [CVE-2022-22965: POC to prove springshell CVE 2022-22965]
  20. GitHub: https://github.com/c4mx/CVE-2022-22965_PoC
    [CVE-2022-22965]
  21. GitHub: https://github.com/chaosec2021/CVE-2022-22965-POC
    [CVE-2022-22965: CVE-2022-22965 spring-core批量检测脚本]
  22. GitHub: https://github.com/colincowie/Safer_PoC_CVE-2022-22965
    [CVE-2022-22965: A Safer PoC for CVE-2022-22965 (Spring4Shell)]
  23. GitHub: https://github.com/daniel0x00/Invoke-CVE-2022-22965-SafeCheck
    [CVE-2022-22965: PowerShell port of CVE-2022-22965 vulnerability check by colincowie.]
  24. GitHub: https://github.com/datawiza-inc/spring-rec-demo
    [CVE-2022-22965: The demo code showing the recent Spring4Shell RCE (CVE-2022-22965)]
  25. GitHub: https://github.com/fracturelabs/go-scan-spring
    [CVE-2022-22965: Vulnerability scanner for Spring4Shell (CVE-2022-22965)]
  26. GitHub: https://github.com/fracturelabs/spring4shell_victim
    [CVE-2022-22965: Intentionally vulnerable Spring app to test CVE-2022-22965]
  27. GitHub: https://github.com/fransvanbuul/CVE-2022-22965-susceptibility
    [CVE-2022-22965]
  28. GitHub: https://github.com/gpiechnik2/nmap-spring4shell
    [CVE-2022-22965: Nmap Spring4Shell NSE script for Spring Boot RCE (CVE-2022-22965)]
  29. GitHub: https://github.com/helsecert/CVE-2022-22965
    [CVE-2022-22965]
  30. GitHub: https://github.com/irgoncalves/irule-cve-2022-22965
    [CVE-2022-22965]
  31. GitHub: https://github.com/itsecurityco/CVE-2022-22965
    [CVE-2022-22965: Docker PoC for CVE-2022-22965 with Spring Boot version 2.6.5]
  32. GitHub: https://github.com/jeremy-cxf/CVE-2022-22965-PoC
    [CVE-2022-22965: CVE-2022-22965-PoC]
  33. GitHub: https://github.com/jrgdiaz/Spring4Shell-CVE-2022-22965.py
    [CVE-2022-22965: Script to check for Spring4Shell vulnerability]
  34. GitHub: https://github.com/kh4sh3i/Spring-CVE
    [CVE-2022-22965: This includes CVE-2022-22963, a Spring SpEL / Expression Resource Access ...]
  35. GitHub: https://github.com/khidottrivi/CVE-2022-22965
    [CVE-2022-22965]
  36. GitHub: https://github.com/lcarea/CVE-2022-22965
    [CVE-2022-22965]
  37. GitHub: https://github.com/likewhite/CVE-2022-22965
    [CVE-2022-22965: CVE-2022-22965 EXP]
  38. GitHub: https://github.com/luoqianlin/CVE-2022-22965
    [CVE-2022-22965: Spring Framework RCE Exploit]
  39. GitHub: https://github.com/mariomamo/CVE-2022-22965
    [CVE-2022-22965]
  40. GitHub: https://github.com/me2nuk/CVE-2022-22965
    [CVE-2022-22965: Spring Framework RCE via Data Binding on JDK 9+ / spring4shell / CVE-2022-22965]
  41. GitHub: https://github.com/mebibite/springhound
    [CVE-2022-22965: Created after the release of CVE-2022-22965 and CVE-2022-22963. Bash script that ...]
  42. GitHub: https://github.com/mwojterski/cve-2022-22965
    [CVE-2022-22965]
  43. GitHub: https://github.com/netcode/Spring4shell-CVE-2022-22965-POC
    [CVE-2022-22965: Another spring4shell (Spring core RCE) POC]
  44. GitHub: https://github.com/nu0l/CVE-2022-22965
    [CVE-2022-22965: Spring-0day/CVE-2022-22965]
  45. GitHub: https://github.com/reznok/Spring4Shell-POC
    [CVE-2022-22965: Dockerized Spring4Shell (CVE-2022-22965) PoC application and exploit]
  46. GitHub: https://github.com/robiul-awal/CVE-2022-22965
    [CVE-2022-22965: Exploit Of Spring4Shell!]
  47. GitHub: https://github.com/rwincey/spring4shell-CVE-2022-22965
    [CVE-2022-22965]
  48. GitHub: https://github.com/snicoll-scratches/spring-boot-cve-2022-22965
    [CVE-2022-22965: Showcase of overridding the Spring Framework version in older Spring Boot versions ...]
  49. GitHub: https://github.com/t3amj3ff/Spring4ShellPoC
    [CVE-2022-22965: Spring4Shell PoC (CVE-2022-22965)]
  50. GitHub: https://github.com/tangxiaofeng7/CVE-2022-22965-Spring-CachedintrospectionResults-Rce
    [CVE-2022-22965: 批量无损检测]
  51. GitHub: https://github.com/tangxiaofeng7/CVE-2022-22965-Spring-Core-Rce
    [CVE-2022-22965: 批量无损检测CVE-2022-22965]
  52. GitHub: https://github.com/twseptian/cve-2022-22965
    [CVE-2022-22965: Spring4Shell - CVE-2022-22965]
  53. GitHub: https://github.com/viniciuspereiras/CVE-2022-22965-poc
    [CVE-2022-22965: CVE-2022-22965 poc including reverse-shell support]
  54. GitHub: https://github.com/wikiZ/springboot_CVE-2022-22965
    [CVE-2022-22965: CVE-2022-22965 pocsuite3 POC]
  55. GitHub: https://github.com/wshon/spring-framework-rce
    [CVE-2022-22965]
  56. GitHub: https://github.com/xnderLAN/CVE-2022-22965
    [CVE-2022-22965: Spring4Shell is a critical RCE vulnerability in the Java Spring Framework and is one ...]
  57. GitHub: https://github.com/zer0yu/CVE-2022-22965
    [CVE-2022-22965: Spring4Shell (CVE-2022-22965)]
  58. GitHub: https://github.com/0zvxr/CVE-2022-22965
    [CVE-2022-22965: Spring4shell | CVE-2022-22965]
  59. GitHub: https://github.com/BobTheShoplifter/Spring4Shell-POC
    [CVE-2022-22965: Spring4Shell Proof Of Concept/And vulnerable application CVE-2022-22965]
  60. GitHub: https://github.com/GuayoyoCyber/CVE-2022-22965
    [CVE-2022-22965: Vulnerabilidad RCE en Spring Framework vía Data Binding on JDK 9+ (CVE-2022-22965 ...]
  61. GitHub: https://github.com/k3rwin/spring-core-rce
    [CVE-2022-22965: Spring框架RCE漏洞 CVE-2022-22965]
  62. GitHub: https://github.com/liangyueliangyue/spring-core-rce
    [CVE-2022-22965: SpringFramework_CVE-2022-22965_RCE简单利用]
  63. GitHub: https://github.com/light-Life/CVE-2022-22965-GUItools
    [CVE-2022-22965: Spring-core单个图形化利用工具,CVE-2022-22965及修复方案已出]
  64. GitHub: https://github.com/Omaraitbenhaddi/-Spring4Shell-CVE-2022-22965-
    [CVE-2022-22965: Exploitation script tryhackme]
  65. GitHub: https://github.com/sunnyvale-it/CVE-2022-22965-PoC
    [CVE-2022-22965: CVE-2022-22965 (Spring4Shell) Proof of Concept]
  66. GitHub: https://github.com/wjl110/CVE-2022-22965_Spring_Core_RCE
    [CVE-2022-22965: CVE-2022-22965Spring-Core-RCE堪比关于 Apache Log4j2核弹级别漏洞exp的rce一键利用]
  67. GitHub: https://github.com/Wrin9/CVE-2022-22965
    [CVE-2022-22965: CVE-2022-22965 POC]

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-22965
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


The spring4shell.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/spring4shell.nbin
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\spring4shell.nbin
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/spring4shell.nbin

Go back to menu.

How to Run


Here is how to run the Spring Framework Spring4Shell (CVE-2022-22965) 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 Framework Spring4Shell (CVE-2022-22965) plugin ID 159542.
  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 spring4shell.nbin -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a spring4shell.nbin -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - spring4shell.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 spring4shell.nbin -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 159917 - Oracle MySQL Enterprise Monitor (Apr 2022 CPU)
  • 159374 - Spring Framework < 5.2.20 / 5.3.x < 5.3.18 Remote Code Execution (CVE-2022-22965)
  • 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)
  • 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)
  • 160544 - Spring Data Commons < 1.13.11 / 2.x < 2.0.6 RCE
  • 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)
  • 159730 - VMware Spring Cloud Function < 3.1.7 / 3.2.x < 3.2.3 SPEL Expression Injection (local check)

Version


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

Go back to menu.