Vulnerabilities in pkg:maven/org.springframework.boot/spring-boot-starter-webflux

PACKAGE
Advisory Identifier: GHSA-36p3-wjmg-h94x
Advisory Summary

CVE-2022-22965 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Spring Framework libraries in the Maven ecosystem. The issue involves remote code execution in spring framework. Remediation is available by upgrading affected packages to version 5.2.20.RELEASE, 5.3.18, 2.5.12, 2.6.6.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.springframework.boot/spring-boot-starter-webflux

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.springframework.boot/spring-boot-starter-webflux. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-36p3-wjmg-h94x CVE-2022-22965 CRITICAL Remote Code Execution in Spring Framework

CVE-2022-22965 at a Glance

CVE Identifier CVE-2022-22965
GHSA Identifier GHSA-36p3-wjmg-h94x
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Spring Framework
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2022-22965

To remediate this vulnerability, upgrade all affected Spring Framework dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.springframework:spring-beans fixed: 5.2.20.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-beans</artifactId>
    <version>5.2.20.RELEASE</version>
</dependency>
org.springframework:spring-beans fixed: 5.3.18
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-beans</artifactId>
    <version>5.3.18</version>
</dependency>
org.springframework:spring-webmvc fixed: 5.2.20.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>5.2.20.RELEASE</version>
</dependency>
org.springframework:spring-webmvc fixed: 5.3.18
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>5.3.18</version>
</dependency>
org.springframework.boot:spring-boot-starter-web fixed: 2.5.12
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <version>2.5.12</version>
</dependency>
org.springframework.boot:spring-boot-starter-web fixed: 2.6.6
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <version>2.6.6</version>
</dependency>
org.springframework:spring-webflux fixed: 5.2.20.RELEASE
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webflux</artifactId>
    <version>5.2.20.RELEASE</version>
</dependency>
org.springframework:spring-webflux fixed: 5.3.18
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webflux</artifactId>
    <version>5.3.18</version>
</dependency>
org.springframework.boot:spring-boot-starter-webflux fixed: 2.5.12
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
    <version>2.5.12</version>
</dependency>
org.springframework.boot:spring-boot-starter-webflux fixed: 2.6.6
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-webflux</artifactId>
    <version>2.6.6</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.springframework

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2022-22965, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.springframework

Analyze the terminal output to locate any version of Spring Framework in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.20.RELEASE), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.springframework command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Spring Framework, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

Spring Framework prior to versions 5.2.20 and 5.3.18 contains a remote code execution vulnerability known as `Spring4Shell`. ## Impact 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 ## Patches - Spring Framework [5.3.18](https://github.com/spring-projects/spring-framework/releases/tag/v5.3.18) and [5.2.20](https://github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE) - Spring Boot [2.6.6](https://github.com/spring-projects/spring-boot/releases/tag/v2.6.6) and [2.5.12](https://github.com/spring-projects/spring-boot/releases/tag/v2.5.12) ## Workarounds For those who are unable to upgrade, leaked reports recommend setting `disallowedFields` on `WebDataBinder` through an `@ControllerAdvice`. This works generally, but as a centrally applied workaround fix, may leave some loopholes, in particular if a controller sets `disallowedFields` locally through its own `@InitBinder` method, which overrides the global setting. To apply the workaround in a more fail-safe way, applications could extend `RequestMappingHandlerAdapter` to update the `WebDataBinder` at the end after all other initialization. In order to do that, a Spring Boot application can declare a `WebMvcRegistrations` bean (Spring MVC) or a `WebFluxRegistrations` bean (Spring WebFlux).

CVE-2022-22965 Affected Spring Framework Versions

10 component(s)
Fixed Versions:
5.2.20.RELEASE5.3.182.5.122.6.6
Product / Package Ecosystem Affected Versions Fixed Version
org.springframework:spring-beans
Maven
< 5.2.20.RELEASE
5.2.20.RELEASE
org.springframework:spring-beans
Maven
≥ 5.3.0
< 5.3.18
5.3.18
org.springframework:spring-webmvc
Maven
< 5.2.20.RELEASE
5.2.20.RELEASE
org.springframework:spring-webmvc
Maven
≥ 5.3.0
< 5.3.18
5.3.18
org.springframework.boot:spring-boot-starter-web
Maven
< 2.5.12
2.5.12
org.springframework.boot:spring-boot-starter-web
Maven
≥ 2.6.0
< 2.6.6
2.6.6
org.springframework:spring-webflux
Maven
< 5.2.20.RELEASE
5.2.20.RELEASE
org.springframework:spring-webflux
Maven
≥ 5.3.0
< 5.3.18
5.3.18
org.springframework.boot:spring-boot-starter-webflux
Maven
< 2.5.12
2.5.12
org.springframework.boot:spring-boot-starter-webflux
Maven
≥ 2.6.0
< 2.6.6
2.6.6

References

NVD — CVE-2022-22965 NVD
https://nvd.nist.gov/vuln/detail/CVE-2022-22965
Security Fix Commit FIX COMMIT
https://github.com/spring-projects/spring-framework/commit/002546b3e4b8d791ea6acccb81eb3168f51abb15
cert-portal.siemens.com/productcert/pdf/ssa... WEB
https://cert-portal.siemens.com/productcert/pdf/ssa-254054.pdf
Spring Framework Release RELEASE
https://github.com/spring-projects/spring-boot/releases/tag/v2.5.12
Spring Framework Release RELEASE
https://github.com/spring-projects/spring-boot/releases/tag/v2.6.6
Spring Framework Source Repository REPOSITORY
https://github.com/spring-projects/spring-framework
Spring Framework Release RELEASE
https://github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE
Spring Framework Security Information SECURITY
https://tanzu.vmware.com/security/cve-2022-22965
Spring Framework Release RELEASE
https://github.com/spring-projects/spring-framework/releases/tag/v5.3.18
psirt.global.sonicwall.com/vuln-detail/snwlid-... WEB
https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005
spring.io/blog/2022/03/31/spr... WEB
https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement
Spring Framework Security Information SECURITY
https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-java-spring-rce-Zx9GUc67
www.cisa.gov/known-exploited-vul... WEB
https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-22965
www.kb.cert.org/vuls/id/970766 WEB
https://www.kb.cert.org/vuls/id/970766
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpuapr2022.html
Spring Framework Security Information SECURITY
https://www.oracle.com/security-alerts/cpujul2022.html
Spring Framework Security Information SECURITY
http://packetstormsecurity.com/files/166713/Spring4Shell-Code-Execution.html
Spring Framework Security Information SECURITY
http://packetstormsecurity.com/files/167011/Spring4Shell-Spring-Framework-Class-Property-Remote-Code-Execution.html

Frequently Asked Questions

What is CVE-2022-22965?
CVE-2022-22965 is a security vulnerability in Spring Framework involving Remote Code Execution in Spring Framework under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Spring Framework versions are affected?
Affected versions include releases prior to 5.2.20.RELEASE, 5.3.18, 2.5.12, 2.6.6 across affected packages: org.springframework:spring-beans, org.springframework:spring-webmvc, org.springframework.boot:spring-boot-starter-web, org.springframework:spring-webflux, org.springframework.boot:spring-boot-starter-webflux.
What version fixes CVE-2022-22965?
Upgrading to 5.2.20.RELEASE, 5.3.18, 2.5.12, 2.6.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is spring-beans affected?
Yes, org.springframework:spring-beans is affected in releases prior to 5.2.20.RELEASE, 5.3.18. Upgrade your dependency to 5.2.20.RELEASE, 5.3.18 or later.
Is spring-webmvc affected?
Yes, org.springframework:spring-webmvc is affected in releases prior to 5.2.20.RELEASE, 5.3.18. Upgrade your dependency to 5.2.20.RELEASE, 5.3.18 or later.
What is the CVSS score of CVE-2022-22965?
CVE-2022-22965 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H.
What CWE is associated with CVE-2022-22965?
CVE-2022-22965 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Maven dependencies for CVE-2022-22965?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.springframework'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-36p3-wjmg-h94x",
  "modified" : "2025-10-22T19:18:34Z",
  "published" : "2022-03-31T18:30:50Z",
  "aliases" : [ "CVE-2022-22965" ],
  "summary" : "Remote Code Execution in Spring Framework",
  "details" : "Spring Framework prior to versions 5.2.20 and 5.3.18 contains a remote code execution vulnerability known as `Spring4Shell`. \n\n## Impact\n\nA 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.\n\nThese are the prerequisites for the exploit:\n- JDK 9 or higher\n- Apache Tomcat as the Servlet container\n- Packaged as WAR\n- `spring-webmvc` or `spring-webflux` dependency\n\n## Patches\n\n- Spring Framework [5.3.18](https://github.com/spring-projects/spring-framework/releases/tag/v5.3.18) and [5.2.20](https://github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE)\n- Spring Boot [2.6.6](https://github.com/spring-projects/spring-boot/releases/tag/v2.6.6) and [2.5.12](https://github.com/spring-projects/spring-boot/releases/tag/v2.5.12)\n\n## Workarounds\n\nFor those who are unable to upgrade, leaked reports recommend setting `disallowedFields` on `WebDataBinder` through an `@ControllerAdvice`. This works generally, but as a centrally applied workaround fix, may leave some loopholes, in particular if a controller sets `disallowedFields` locally through its own `@InitBinder` method, which overrides the global setting.\n\nTo apply the workaround in a more fail-safe way, applications could extend `RequestMappingHandlerAdapter` to update the `WebDataBinder` at the end after all other initialization. In order to do that, a Spring Boot application can declare a `WebMvcRegistrations` bean (Spring MVC) or a `WebFluxRegistrations` bean (Spring WebFlux).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-beans"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.20.RELEASE"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-beans"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.18"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-webmvc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.20.RELEASE"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-webmvc"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.18"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-starter-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-starter-web"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-webflux"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.2.20.RELEASE"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework:spring-webflux"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.0"
      }, {
        "fixed" : "5.3.18"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-starter-webflux"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.springframework.boot:spring-boot-starter-webflux"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.6.0"
      }, {
        "fixed" : "2.6.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-22965"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/commit/002546b3e4b8d791ea6acccb81eb3168f51abb15"
  }, {
    "type" : "WEB",
    "url" : "https://cert-portal.siemens.com/productcert/pdf/ssa-254054.pdf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/releases/tag/v2.5.12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-boot/releases/tag/v2.6.6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/spring-projects/spring-framework"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/spring-projects/spring-framework/releases/tag/v5.3.18"
  }, {
    "type" : "WEB",
    "url" : "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005"
  }, {
    "type" : "WEB",
    "url" : "https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement"
  }, {
    "type" : "WEB",
    "url" : "https://tanzu.vmware.com/security/cve-2022-22965"
  }, {
    "type" : "WEB",
    "url" : "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-java-spring-rce-Zx9GUc67"
  }, {
    "type" : "WEB",
    "url" : "https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-22965"
  }, {
    "type" : "WEB",
    "url" : "https://www.kb.cert.org/vuls/id/970766"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuapr2022.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpujul2022.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/166713/Spring4Shell-Code-Execution.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/167011/Spring4Shell-Spring-Framework-Class-Property-Remote-Code-Execution.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-74", "CWE-94" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-31T18:30:50Z",
    "nvd_published_at" : "2022-04-01T23:15:00Z"
  }
}