Prisma Cloud Mitigations for SpringShell and Recent Spring Vulnerabilities: CVE-2022-22963, CVE-2022-22965

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
L4 Transporter

Authors: Nathaniel Quist, Ariel Zelivansky, Aviv Sasson, Alok Tongaonkar

Executive Summary

In the past week, multiple vulnerabilities affecting the Spring Framework have been disclosed to the public. Among four vulnerabilities released since the beginning of March, CVE-2022-22965, which was uncovered on March 31, 2022, had the most critical impact and was dubbed SpringShell.

 

The SpringShell vulnerability allows attackers unauthenticated remote code execution (RCE) to affected systems. A full analysis of the SpringShell vulnerability can be found in the Unit 42 Threat Brief.

 

Prisma Cloud can detect all recent SpringShell vulnerabilities across all cloud assets. In addition to detecting affected instances, Prisma Cloud can prevent and stop the execution of vulnerable container images. Prisma Cloud is also able to prevent exploitation of the vulnerabilities with different capabilities as well as post-exploitation techniques.

Background

The Spring Framework is an open-source and comprehensive application framework for the Java Platform. It is widely used in the industry due to its powerful features and ease of use. The Spring Core component is the core of the framework that provides powerful features such as Inversion of Control and dependency injection. It contains core, beans, context, and the Spring Expression Language (SpEL) modules.

 

The Spring Cloud Function is a project that is designed to promote the development lifecycle of business logic and support uniform programming models across serverless providers. Where the Spring Expression Language (SpEL) supports the querying and manipulation of an object at runtime, using a Unified EL which includes method invocation and basic string templating functionality.

 

Since the beginning of March, there have been a total of four CVEs published pertaining to the Spring Framework:

Prisma Cloud Detection Capabilities

Prisma Cloud users can detect software components affected by either of these two vulnerabilities, CVE-2022-22963 or CVE-2022-22965. The Prisma Cloud Intelligence Stream (IS) automatically updates to include the vulnerability information from official vendor feeds. This allows Prisma Cloud to directly reflect any updates or analysis by Linux distribution and application maintainers, allowing Prisma Cloud to detect any affected functions, images, and hosts.

 

Prisma Cloud also employs the use of PRISMA IDs which contain a curated set of industry-known vulnerabilities affecting systems and applications, but which have not been, or not yet been, assigned CVE tracking numbers. Vulnerabilities that are industry known but have yet to be assigned a CVE tracking number are analyzed by Prisma Cloud’s Cloud Security Research Team (CSRT) and then added to Prisma Cloud’s IS. Through the use of PRISMA-IDs to track industry-known vulnerabilities, Prisma Cloud can push vulnerability detection rules to client environments in short order, often times faster than CVE publications are released to the public.

 

Case in point, the SpringShell vulnerability (CVE-2022-22965) is one such example of Prisma IDs rules providing vulnerability detections at a faster rate than public CVE publications. The SpringShell CVE (CVE-2022-22965) was published on March 31, 2022, however, Prisma Cloud’s CSRT published the Prisma ID rule ‘PRISMA-2022-0130’ on March 30, 2022. This equates to clients of Prisma Cloud’s Cloud Workload Protection (CWP) module being capable of detecting CVE-2022-22965 hours prior to the official vulnerability release.

 

RPrasadi_4-1648848794529.png

 

Figure 1. PRISMA-2022-0130 in Intelligence Stream

Query Your Environments for Hosts With This Risk

Prisma Cloud’s RQL (Resource Query Language) provides a quick and easy way to query for resources impacted. In this case, users can utilize the Prisma platform's capabilities to isolate assets with vulnerabilities and also prioritize them further by looking for internet-exposed assets receiving traffic. 

Know the hosts in your cloud that have the specific vulnerability CVE-2022-22963 or CVE-2022-22965:

config from cloud.resource where finding.type = 'Host Vulnerability' AND protection.finding.name IN ('CVE-2022-22963', 'CVE-2022-22965')

RPrasadi_5-1648848794536.png

 

 

Figure 2. CVE-2022-22963 and CVE-2022-22965 vulnerability information for hosts with RQL query

 

Know the Internet exposed hosts that are receiving traffic in your cloud and have the specific vulnerability CVE-2022-22963 or CVE-2022-22965:

network from vpc.flow_record where bytes > 0 AND destination.resource IN ( resource where finding.type IN ( 'Host Vulnerability' ) AND finding.source IN ( 'Prisma Cloud' ) AND finding.name IN ('CVE-2022-22963', 'CVE-2022-22965') ) AND source.publicnetwork IN ('Internet IPs', 'Suspicious IPs')

 

RPrasadi_6-1648848794534.png

 

Figure 3. Investigating vulnerable instances with the network RQL query

WAAS Detections

 

Prisma Cloud users with WAAS enabled are protected from the majority of exploits we analyzed for SpringShell (CVE-2022-22965) by the App Firewall Code Injection detection feature.

RPrasadi_7-1648848794538.png

 

Figure 4. WAAS prevents SpringShell exploitation

 

For CVE-2022-22963 (Spring Cloud Function), users with WAAS enabled may import the following new custom rule for protection:

 

req.headers["Spring.cloud.function.routing-Expression"] contains /.*java\.lang.*/

 

Summary

SpringShell was a severe vulnerability affecting the widely used Spring Framework. SpringShell is officially assigned CVE-2022-22965 and the patch was released on March 31, 2022. In addition, three other vulnerabilities affecting the Spring Cloud Gateway, Spring Expression Language (SpEL), and Spring Cloud Function components have been disclosed since the beginning of March 2022.

Prisma Cloud can help in detecting all vulnerable instances in your deployments. Prisma Cloud may also be configured to fully prevent running any images or hosts vulnerable to this issue.

For an in-depth technical analysis of the SpringShell vulnerability, please refer to Palo Alto Networks Unit 42’s Threat Brief.

 

Register or Sign-in
Labels