Spring4Shell

Also tracked as: SpringShell

Disclosed Mar 31, 2022

Updated Dec 1, 2026

*4ShellCVSS 9.8CISA KEVConditional RCE

Remote code execution in Spring MVC and Spring WebFlux running on JDK 9+ via unsafe data binding to ClassLoader properties. Most reliably exploited when applications are deployed as WAR archives on Apache Tomcat.

Component

Spring Framework Data Binding (ClassLoader)

Attack Vector & Class

Conditional RCE

Logic / Deserialization

Exploitation Status

Listed in CISA KEV

KEV added Apr 4, 2022

CVSS & Ecosystems

9.8 (v3.1)

Java, Spring

Affected Versions

  • Spring Framework 5.3.0 to 5.3.17
  • Spring Framework 5.2.0 to 5.2.19 (and older unsupported versions)
  • Requires JDK 9+, Spring MVC / WebFlux data binding, and WAR deployment on Apache Tomcat

Fixed / Recommended Versions

  • Spring Framework 5.3.18+ or 5.2.20+
  • Spring Boot 2.6.6+ or 2.5.12+

Technical Root Cause

JDK 9 introduced the Class.getModule() API, which bypassed Spring Framework's existing blocklist protecting ClassLoader access during parameter binding. By crafting HTTP parameters traversing class.module.classLoader.resources.context.parent.pipeline.first, attackers could reconfigure Tomcat's AccessLogValve to write an arbitrary JSP web shell into the webroot.

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Remediation & Hardening

  1. 1Upgrade to Spring Framework 5.3.18+ / 5.2.20+ (or Spring Boot 2.6.6+ / 2.5.12+).
  2. 2Update Apache Tomcat to 10.0.20+, 9.0.62+, or 8.5.78+ for defense-in-depth hardening of ClassLoader access.
  3. 3Restart all JVM processes and rebuild container images after upgrading.