---
title: "Your SpringShell (Spring4Shell) Remediation Cookbook Using the JFrog Platform"
url: "https://jfrog.com/blog/springshell-remediation-cookbook/"
canonical: "https://jfrog.com/blog/springshell-remediation-cookbook/"
lang: "en-US"
type: "article"
description: "How to detect, block, and remediate to protect your organization from the SpringShell (Spring4Shell) vulnerability using Artifactory and Xray."
date: "2022-04-01T21:42:50"
modified: "2023-01-05T17:28:37"
---
# Your SpringShell (Spring4Shell) Remediation Cookbook Using the JFrog Platform

[Blog Home](https://jfrog.com/blog/)

![SpringShell / Spring4Shell CVE-2022-22965 Remediation Cookbook With the JFrog Platform](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/Spring4Shell-V2-863x300-1.png)

A new zero-day exploit in the spring-web package called “SpringShell” (nicknamed “Spring4Shell”) was just leaked and is threatening the internet and the community. The JFrog security research team is investigating the exploit and continuously updating our blog post with technical details on the [SpringShell (Spring4Shell) vulnerability](https://jfrog.com/blog/springshell-zero-day-vulnerability-all-you-need-to-know/). 

In this technical blog post, we explain how you can use the JFrog platform to detect, block, and remediate the SpringShell vulnerability to protect your organization.

## What You Need to Know

As often happens when a zero-day exploit is discovered, the developer community, facing long evening and weekend hours to track it down, has many anxious questions. But users of the JFrog Platform most need to know these two things:

### JFrog Products are Unaffected

None of our platform solutions, including Artifactory, Xray, Pipelines, and Distribution, are affected by the SpringShell vulnerability CVE-2022-22965 or Spring Cloud Function CVE-2022-22963. 

You might well ask: How could we determine this so quickly and with such certainty? For the same reason that you, a JFrog customer, can for your own software projects – because Artifactory and Xray are a central part of our mission-critical software development lifecycle (SDLC).

### Your Weekend is Safe With JFrog

As a JFrog Platform user, **you already have the tools you need** to quickly remediate against the SpringShell vulnerability – or any other zero-day security issue you have yet to encounter. With your accumulated packages, binaries, images, and metadata under Artifactory’s [binary repository management](https://jfrog.com/artifactory), you already have everything you need to save your weekend.

_“It was the easiest thing to generate a report of what apps had that vulnerable \[[log4j](https://jfrog.com/log4j-log4shell-resources/)\] dependency, fix it, and we were good to go.”  
– DevOps Service Owner, Bendigo and Adelaide Bank_

We’ll explain how you can swiftly protect your organization using the JFrog Platform. You’ll learn how to:

*   **FIND** – Use Artifactory’s build-info metadata and Xray’s [deep-binary scanning](https://jfrog.com/article/deep-recursive-scanning/) to discover every usage of packages containing the SpringShell vulnerability, including transitive dependencies, across your entire inventory of artifacts and applications in all stages of the SDLC.
*   **FIX** – Once yourJFrog Platform solutions have identified applications using a vulnerable package, developers can update their source code to use the safer, updated version and produce a new build.
*   **FORTIFY** – Use Xray to block any further builds using vulnerable package versions, and any promotion to production release of vulnerable builds already in your pipeline. Or use Artifactory exclude patterns for more limited way to block.

* * *

## Find all Usage of SpringShell (Spring4Shell) Vulnerable Packages

With JFrog Artifactory to manage all your binaries and [JFrog Xray](https://jfrog.com/xray/) for automated vulnerability scanning of those binaries, you can quickly pinpoint where the SpringShell vulnerability is present in your software supply chain and implement security measures throughout the SDLC.

Depending on which set of JFrog Platform solutions you have installed and use as a regular part of your SDLC, you have these methods available to quickly pinpoint where the SpringShell vulnerability is present in your software supply chain and implement security measures throughout the SDLC.

*   Using Artifactory and Xray (Best Method for All Coverage)
    *   Use Xray reports to trace all SpringBoot packages in Repos/Builds/Release Bundles/Watches
    *   Use the Xray violations pane to filter vulnerable monitored resources
    *   Use an Xray watch to alert upon an attempt to download the vulnerable SpringBoot package
*   Using Artifactory only (Good Method for Internal Coverage)
    *   Use the Artifactory search capability to find all repositories and namespaces with SpringBoot library
    *   Use Artifactory build-info (Software bill of materials – SBOM)

### ![find Spring4shell using Xray](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/03/XRAY_I_GRN_rgb-50png.png)Using Artifactory and Xray (Best Method for All Coverage)

JFrog Xray’s deep-recursive scanning provides the most comprehensive analysis of your binaries in Artifactory, **including transitive dependencies in third-party packages or artifacts** such as Uber Jars or base Docker images from a public repository like DockerHub. With Xray, you can be sure to catch every usage of a critically vulnerable package like SpringShell in any or all of your repos, builds, or release bundles.

**Did You Know?**Xray is included in all JFrog Cloud subscriptions, including free accounts. For self-managed installations on-prem or in the cloud, you can install a free trial of Xray in as little as 5 minutes.  
[Try Xray](https://jfrog.com/xray/try/)

These are the ways you can use Xray:

#### Use Xray reports to trace all spring-web artifacts in Repos, Builds & Release Bundles

##### Assumptions:

*   Artifactory with Xray is installed
*   The required scope of artifacts are [indexed](https://www.jfrog.com/confluence/display/JFROG/Repository+Management) (make sure to “reindex” so that already existing binaries will be scanned):
    *   Repositories – Relevant repositories are indexed
    *   Builds –  CI systems are integrated with Artifactory and upload “Build-info” for builds.
    *   Release bundles – Release bundles are used to distribute binaries to production.

##### Steps:

1\. Go to **Security and compliance > Reports**

![Artifactory with Xray security and compliance report](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-01.png?speedsize=w_1024)

2\. Create new report with the scope you would like to discover

![Spring4shell report in Xray](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-02.png)

3\. After selecting the concerned resources, add **CVE-2022-22965** as the criteria

![Spring4Shell report - CVE-2022-22965 as the criteria](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-03.png)

These criteria will help to generate a report in various formats, such as the following example:

![Spring4shell generated report](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-04.png?speedsize=w_1024)

You can later export to PDF / CSV / JSON formats:

![Vulnerability report Spring4Shell](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-05.png?speedsize=w_1024)

### Use the Xray violations pane to filter vulnerable monitored resources

##### Assumptions:

*   Artifactory with Xray is installed
*   Watch is monitoring the resources you would like to filter, and the **CVE-2022-22965** triggered a violation

##### Steps:

1\. Go to an already existing watch and click on the “filters” icon.

![Updating existing springshell watch](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-06.png?speedsize=w_1024)

2\. Filter on the specific **CVE-2022-22965**, with the relevant settings such as **custom timeframe**, **Any Build**, and **Any Release Bundle**

![Filter Spring4Shell watch for a specific CVE-2022-22965](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-07.png)

### Using an Xray watch to alert upon an attempt to download vulnerable spring-web artifact

Using [Xray policies and watches](https://jfrog.com/confluence/display/JFROG/Creating+Xray+Policies+and+Rules), you can alert (and block) upon an attempt to download the vulnerable spring-web artifact. We recommend that upon a violation a webhook would alert to a dedicated channel (such as Slack) to your security team

##### Assumptions:

*   Artifactory with Xray is installed
*   Relevant Maven and Gradle repositories are flagged with “Xray index” enabled.

##### Steps:

1\. Create an Xray policy that defines a violation with a criteria of minimal severity “Critical.” 

![Create SprigShell Xray policy](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-08.png)

2\. Create a watch associated with the policy above

3\. Apply it to **“all repositories”** with a **filter to include only spring-web** artifact names (_spring-web-.\*jar_).

![filter to include only spring-web artifact names](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-09.png?speedsize=w_1024)

4\. Run the “Apply on existing content” with the relevant time frame on the new watch to trigger violations on spring-web.  

![Xray watch to trigger violations on spring-web](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-10.png?speedsize=w_1024)

### ![Find use of all Spring4Shell Vulnerable Packages using Artifactory](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/03/AF_I_GRN_rgb-50.png)Using Artifactory Only (Good Method for Internal Coverage)

To produce a Software Bill of Materials (SBOM) for your applications, we hope you have been [publishing build-info metadata through the JFrog CLI](https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-PublishingBuild-Info) or in your [Pipelines CI/CD automation](https://www.jfrog.com/confluence/display/JFROG/PublishBuildInfo). This is one of the most essential [best DevOps practices](https://jfrog.com/whitepaper/devops-8-reasons-for-devops-to-use-a-binary-repository-manager/) enabled by the JFrog Platform, making all of your builds fully traceable to all of their component sources.

Armed with this data about your binaries, you can search all your builds for the vulnerable SpringShell package.With Artifactory’s rich search capabilities, you can also narrow your search to target the most immediately relevant builds, enabling you to focus your efforts and zero in on what needs your urgent attention.

However, this benefit accrues **only to the builds you make through your CI**. So using build-info in Artifactory alone will not cover situations when SpringShell is already packed into another package/artifact like Uber Jars, a base docker image, etc. Only Xray can scan these third-party binaries and provide you complete coverage, as well as continuously monitor for download and use of this vulnerable artifact in future. 

#### Use Artifactory search to find all ‘spring-web’ artifacts and all the related builds

You can search across all of your Artifactory repositories to discover where packages, artifacts, and builds are used.

##### Assumptions:

*   Artifactory is installed

##### Steps:

[Use the search bar in Artifactory](https://www.jfrog.com/confluence/display/JFROG/Application+Search) to lookup the spring-web artifacts that are cached in Artifactory remote repositories, as well as their locations in local repositories.

![Use the search bar in Artifactory to lookup the spring-web artifacts](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-11.png?speedsize=w_1024)

#### Use Artifactory build-info (Software bill of materials – SBOM)

JFrog artifactory CLI and CI plugins can store [build-info,](https://www.jfrog.com/confluence/display/JFROG/BuildInfo) the metadata associated with a build from Artifactory. When you follow the JFrog best practice and store build info in your Artifactory instance, you can search Artifactory repositories to list all the builds that use the spring-web library as a dependency.

##### Assumptions:

*   Artifactory is installed
*   CI server is integrated with Artifactory and it publish [build-info](https://www.jfrog.com/confluence/display/JFROG/Build+Integration#BuildIntegration-Overview)

##### Steps (through the JFrog Platform UI):

1\. Follow the previous section of “_Use Artifactory search to find all repositories and namespaces with spring-web library”_

2\. For each vulnerable version of the spring-web artifact, examine the “used by” tab.

![For each vulnerable version of the spring-web artifact, examine the “used by” tab](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-12.png?speedsize=w_1024)

##### Steps (through the Artifactory REST API):

Another method is to use the [Artifactory API to search a checksum in builds](https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-BuildsforDependency) (each spring-web artifact has a different checksum):

  

* * *

## Fix Your Builds

Once you know which of your artifacts, builds, and release bundles are vulnerable, your development teams can update their source code and produce new, remediated builds and release bundles. 

Spring has posted a [Spring Framework RCE response](https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement), and continues to update it with fresh information as it becomes available, including fixes and workarounds.

The JFrog Security Research team is also investigating, and has provided a [technical explanation of SpringShell](https://jfrog.com/blog/springshell-zero-day-vulnerability-all-you-need-to-know/). We will update with suggested remediations and mitigations as our investigations continue.  

* * *

## Fortify to Block Use of Vulnerable spring-web Artifact

#### ![Use Xray policy to block attempts to download vulnerable spring-web artifact](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/03/XRAY_I_GRN_rgb-50png.png)Use Xray policy to block **attempts to** **download of the vulnerable artifact**

Using [Xray policies and watches](https://jfrog.com/confluence/display/JFROG/Creating+Xray+Policies+and+Rules), you can alert (and block) upon an attempt to download a vulnerable spring-web artifact. 

##### Assumptions:

*   Artifactory with Xray is installed
*   Relevant local and remote Maven and Gradle repositories are flagged with “Xray index” enabled.

##### Steps:

Same as “Using Xray watch to alert upon an attempt to download vulnerable spring-web artifacts”, with “Block download” flag set

![Xray Block download” flag set](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/04/S4SRem-14.png?speedsize=w_1024)

#### ![Configure Artifactory exclude patterns on remote repositories](https://speedmedia2.jfrog.com/08612fe1-9391-4cf3-ac1a-6dd49c36b276/jfrog.com/wp-content/uploads/2022/03/AF_I_GRN_rgb-50.png)Configure Artifactory exclude patterns on remote repositories

##### Assumptions:

*   Artifactory is installed
*   Note: This is considered a partial coverage since you can find association to this package, but it will not cover situations when the package is already packed into another package/artifact like Uber Jars, base docker image, etc.. **Only Xray can scan binaries and provide you complete coverage, including continuous monitoring if one of the developers will upload or use this artifact in the near future**. 

##### Steps:

Configure an exclude rule to select against the library’s \`\*jar\` file, to prevent it from being resolved by Maven and Gradle repositories. (For more information, see [this blog post](https://jfrog.com/blog/yet-another-case-for-using-exclude-patterns-in-remote-repositories/).)

This will result in developers being unable to access the base jar for their dependency resolution and is a good way to prevent the affected code from being used. 

* * *

## Something for Everyone

As you can see, thousands of customers of the JFrog Platform, whether in the cloud or on-prem, have the ready means to **find**, **fix**, and **fortify** their entire software supply chain from the SpringShell vulnerability in only hours. The best practices of [DevSecOps](https://jfrog.com/learn/devsecops/) through rich binaries management, [SBOMs](https://www.forrester.com/blogs/log4j-open-source-maintenance-and-why-sboms-are-critical-now/), and SCA enabled by Artifactory and Xray are helping many to save their weekends and holidays.

Not using the JFrog Platform? Well,…you may have to reconsider your weekend plans.

But not so fast, we’re still here to help! The JFrog Security Research Team has just published an open source [scan\_spring tool](https://github.com/jfrog/jfrog-spring-tools) that can be used to scan **any** compiled code (not just in Artifactory) and verify whether Spring endpoints that make the vulnerability exploitable exist in the codebase.