CVE-2020-5413
📋 TL;DR
CVE-2020-5413 is a critical deserialization vulnerability in Spring Integration's Kryo Codec implementation that allows remote code execution when processing untrusted data. Attackers can exploit this by sending malicious serialized objects that execute arbitrary code during deserialization. This affects applications using Spring Integration with Kryo configured with default settings.
💻 Affected Systems
- Spring Integration
📦 What is this software?
Banking Corporate Lending Process Management by Oracle
View all CVEs affecting Banking Corporate Lending Process Management →
Banking Corporate Lending Process Management by Oracle
View all CVEs affecting Banking Corporate Lending Process Management →
Banking Corporate Lending Process Management by Oracle
View all CVEs affecting Banking Corporate Lending Process Management →
Banking Credit Facilities Process Management by Oracle
View all CVEs affecting Banking Credit Facilities Process Management →
Banking Credit Facilities Process Management by Oracle
View all CVEs affecting Banking Credit Facilities Process Management →
Banking Credit Facilities Process Management by Oracle
View all CVEs affecting Banking Credit Facilities Process Management →
Banking Virtual Account Management by Oracle
View all CVEs affecting Banking Virtual Account Management →
Banking Virtual Account Management by Oracle
View all CVEs affecting Banking Virtual Account Management →
Banking Virtual Account Management by Oracle
View all CVEs affecting Banking Virtual Account Management →
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise with remote code execution as the application user, potentially leading to data theft, ransomware deployment, or lateral movement within the network.
Likely Case
Remote code execution allowing attackers to execute arbitrary commands, access sensitive data, or disrupt application functionality.
If Mitigated
No impact when proper controls are implemented, such as configuring Kryo to only deserialize trusted classes or applying patches.
🎯 Exploit Status
Exploitation requires sending malicious serialized data to vulnerable endpoints. The vulnerability is well-documented with public proof-of-concept code available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Spring Integration 5.2.8, 5.1.12, 5.0.16
Vendor Advisory: https://tanzu.vmware.com/security/cve-2020-5413
Restart Required: Yes
Instructions:
1. Update Spring Integration to version 5.2.8 or later. 2. Update dependencies in your build configuration (Maven pom.xml or Gradle build.gradle). 3. Rebuild and redeploy your application. 4. Restart the application server.
🔧 Temporary Workarounds
Configure Kryo with trusted classes
allConfigure Kryo to only deserialize trusted classes by implementing a custom KryoRegistrar that registers allowed classes.
// Java configuration example:
@Bean
public KryoRegistrar kryoRegistrar() {
return kryo -> {
kryo.register(TrustedClass1.class);
kryo.register(TrustedClass2.class);
// Register all classes that should be deserializable
kryo.setRegistrationRequired(true);
};
}
Disable Kryo Codec
allSwitch to alternative serialization methods if Kryo Codec is not required.
// Remove or comment Kryo Codec configuration in Spring Integration setup
🧯 If You Can't Patch
- Implement network segmentation to isolate vulnerable applications from untrusted networks
- Deploy web application firewall (WAF) rules to block suspicious serialized data patterns
🔍 How to Verify
Check if Vulnerable:
Check Spring Integration version in your project dependencies. If using Maven: mvn dependency:tree | grep spring-integration. If using Gradle: gradle dependencies | grep spring-integration.
Check Version:
mvn dependency:tree | grep -i 'spring-integration' || gradle dependencies | grep -i 'spring-integration'
Verify Fix Applied:
Verify the updated version appears in your dependency tree and that Kryo configuration now requires class registration.
📡 Detection & Monitoring
Log Indicators:
- Unusual deserialization errors
- Stack traces containing Kryo or deserialization-related classes
- Unexpected process execution from application context
Network Indicators:
- Unusual data patterns in serialized object streams
- Requests containing serialized Java objects to vulnerable endpoints
SIEM Query:
source="application.logs" AND ("Kryo" OR "deserialization" OR "ClassNotFoundException") AND severity=ERROR
🔗 References
- https://tanzu.vmware.com/security/cve-2020-5413
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://tanzu.vmware.com/security/cve-2020-5413
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpuoct2021.html