Skip to content
RCE Write-up Advanced

RCE Flaw For Java Spring Framework: Spring4Shell! — CVE-2022–22965

A remote code execution flaw in the Java Spring Framework (Spring4Shell) allows an attacker to manipulate the object graph during HTTP request binding, potentially leading to arbitrary command execution. The vulnerability affects specific versions of Spring Core and JDK 9+.

mbdogrusoz Follow

Published on systemweakness.com

Remote command execution provides to run of critical or arbitrary commands from remote for a threat actor.These critical commands are generally used to hijack users’ name and passwords.These commands implement in Linux.These commands are cd to change directory, cat to read the file contents, su or sudo to be super…

mbdogrusoz, on systemweakness.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the framework's data binding allowed access to the new getModule() method introduced in Java 9, which provided an unintended path to the class loader and thus to code execution.

Impact

An attacker could achieve remote command execution, potentially leading to privilege escalation, malware installation, or theft of sensitive data.

What the attacker needed

Spring Core versions before 5.2, 5.3.0–17, 5.2.0–19; JDK version 9 or higher; Application uses Spring MVC with data binding

The fix

Upgrade Spring Framework to version 5.3.18 or 5.2.20, or if unable to upgrade, restrict allowed fields for data binding to non-basic types.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This is a serious bug in a popular Java framework called Spring. It lets an attacker send a specially crafted web request that tricks the framework into running commands on the server, which could let them take control. The problem arises because a newer Java feature (modules) opened a new path that the framework did not block.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.