CVE-2020-5413: Code execution in Spring Integration

Summary

05/08/2020
Yes i
Critical
9.8

CVE-2020-5413: Code execution in Spring Integration. Affects org.springframework.integration:spring-integration-core across 4 version ranges.

>= 4.3.0, < 4.3.23 >= 5.1.0, < 5.1.12 >= 5.2.0, < 5.2.8 >= 5.3.0, < 5.3.2

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Spring Integration is a framework that provides support for building message-driven applications. It offers various features for integrating different systems and components. One of the key functionalities of Spring Integration is the Kryo Codec implementation, which allows for Java (de)serialization. However, when Kryo is configured with default options, it can lead to a vulnerability known as "deserialization gadgets" exploit. This vulnerability allows an attacker to execute malicious code during the deserialization process. To mitigate this vulnerability, Spring Integration should proactively block unknown "deserialization gadgets" by configuring Kryo to require a set of trusted classes for (de)serialization.

Vulnerability Detail

The vulnerability in Spring Integration arises from the use of Kryo Codec with default options. When unregistered classes are encountered during deserialization, they are resolved on demand, which can be exploited by an attacker to execute arbitrary code. This type of attack is known as the "deserialization gadgets" exploit. The impact of this vulnerability can be severe, as it allows an attacker to execute arbitrary code within the context of the application, potentially leading to unauthorized access, data breaches, or system compromise. The vulnerability has a CVSS score of 9.8, indicating its critical severity.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 4.3.0, < 4.3.23 4.3.23
  • >= 5.1.0, < 5.1.12 5.1.12
  • >= 5.2.0, < 5.2.8 5.2.8
  • >= 5.3.0, < 5.3.2 5.3.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, it is possible to configure Kryo to only allow deserialization of a predefined set of trusted classes. This can be done by explicitly registering the trusted classes with Kryo and rejecting any other unregistered classes during deserialization. Here is an example of how to configure Kryo with trusted classes:

Kryo kryo = new Kryo();
kryo.register(TrustedClass1.class);
kryo.register(TrustedClass2.class);
// Register other trusted classes
kryo.setRegistrationRequired(true);

By setting setRegistrationRequired(true), Kryo will throw an exception if an unregistered class is encountered during deserialization.

Conclusion

In conclusion, the CVE-2020-5413 vulnerability in Spring Integration allows for code execution during deserialization, which can lead to severe consequences such as unauthorized access, data breaches, or system compromise. It is crucial to update the affected versions of Spring Integration to the fixed versions and configure Kryo to require trusted classes for (de)serialization. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.springframework.integration:spring-integration-core →

Share this vulnerability

FAQ

Spring Integration is a framework that provides support for building message-driven applications. It offers various features for integrating different systems and components.

The Kryo Codec is an implementation in Spring Integration that allows for Java (de)serialization. It is used for converting objects into a byte stream and vice versa.

The "deserialization gadgets" exploit is a type of attack that takes advantage of vulnerabilities in the deserialization process. It involves providing malicious data during deserialization, which can lead to the execution of arbitrary code.

This vulnerability can allow an attacker to execute arbitrary code within the context of the application. This can lead to unauthorized access, data breaches, or compromise of the entire system.

The CVSS score of this vulnerability is 9.8, indicating its critical severity.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 4.3.0, < 4.3.23 4.3.23
  • >= 5.1.0, < 5.1.12 5.1.12
  • >= 5.2.0, < 5.2.8 5.2.8
  • >= 5.3.0, < 5.3.2 5.3.2

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback