# CVE-2020-5413: Kryo Configuration Allows Code Execution with Unknown "Serialization Gadgets"

> Attackers can execute arbitrary code via malicious deserialization gadgets when Spring Integration uses Kryo with default settings.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Jul 2020
- **Updated:** 16 Sep 2024
- **Also known as:** GHSA-86qr-9vqc-pgc6

## What is CVE-2020-5413?

CVE-2020-5413 is a critical unsafe deserialization vulnerability in Oracle Flexcube Private Banking, published on 31 Jul 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Spring Integration framework provides Kryo Codec implementations as an alternative for Java (de)serialization. When Kryo is configured with default options, all unregistered classes are resolved on demand. This leads to the "deserialization gadgets" exploit when provided data contains malicious code for execution during deserialization. In order to protect against this type of attack, Kryo can be configured to require a set of trusted classes for (de)serialization. Spring Integration should be proactive against blocking unknown "deserialization gadgets" when configuring Kryo in code.

Weakness: CWE-502 (Deserialization of Untrusted Data)

## Which versions are affected by CVE-2020-5413?

8 open source packages ship an affected version, including org.springframework.integration:spring-integration-core. It affects 8 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.springframework.integration:spring-integration-core` | Maven | From 4.3.0 | 4.3.23 |
| `org.springframework.integration:spring-integration-core` | Maven | From 4.3.0 | 4.3.23 |
| `org.springframework.integration:spring-integration-core` | Maven | From 5.1.0 | 5.1.12 |
| `org.springframework.integration:spring-integration-core` | Maven | From 5.1.0 | 5.1.12 |
| `org.springframework.integration:spring-integration-core` | Maven | From 5.2.0 | 5.2.8 |
| `org.springframework.integration:spring-integration-core` | Maven | From 5.2.0 | 5.2.8 |
| `org.springframework.integration:spring-integration-core` | Maven | From 5.3.0 | 5.3.2 |
| `org.springframework.integration:spring-integration-core` | Maven | From 5.3.0 | 5.3.2 |

Products: Oracle Banking Corporate Lending Process Management, Oracle Banking Credit Facilities Process Management, Oracle Banking Supply Chain Finance, Oracle Banking Virtual Account Management, Oracle Flexcube Private Banking, Oracle Retail Customer Management and Segmentation Foundation, Oracle Retail Merchandising System, Vmware Spring Integration.

## How do I fix CVE-2020-5413?

Upgrade org.springframework.integration:spring-integration-core to a fixed version for your release line: 4.3.23, 5.1.12, 5.2.8 or 5.3.2.

## Is CVE-2020-5413 being exploited?

There is no known exploitation of CVE-2020-5413 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-5413 and fix it if it is affected.

What it is: CVE-2020-5413 is a critical unsafe deserialization vulnerability in Oracle Flexcube Private Banking, published on 31 Jul 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-5413 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.springframework.integration:spring-integration-core (Maven): affected from 4.3.0; fixed in 4.3.23
- org.springframework.integration:spring-integration-core (Maven): affected from 4.3.0; fixed in 4.3.23
- org.springframework.integration:spring-integration-core (Maven): affected from 5.1.0; fixed in 5.1.12
- org.springframework.integration:spring-integration-core (Maven): affected from 5.1.0; fixed in 5.1.12
- org.springframework.integration:spring-integration-core (Maven): affected from 5.2.0; fixed in 5.2.8
- org.springframework.integration:spring-integration-core (Maven): affected from 5.2.0; fixed in 5.2.8
- org.springframework.integration:spring-integration-core (Maven): affected from 5.3.0; fixed in 5.3.2
- org.springframework.integration:spring-integration-core (Maven): affected from 5.3.0; fixed in 5.3.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-5413/ (Markdown: https://insights.sbomify.com/CVE-2020-5413/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-5413
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-5413
- OSV: https://osv.dev/vulnerability/CVE-2020-5413

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-5413/
Summaries are generated and may contain mistakes; the official description above is the record.
