CVE-2020-35728
Serialization Gadget vulnerability in com.fasterxml.jackson.core:jackson-databind
What is CVE-2020-35728 About?
This vulnerability in FasterXML jackson-databind 2.x before 2.9.10.8 mishandles serialization gadgets, specifically `com.oracle.wls.shaded.org.apache.xalan.lib.sql.JNDIConnectionPool`. It allows for deserialization of untrusted data, potentially leading to remote code execution or denial of service when handling malicious input, an attack that can be highly impactful if successful.
Affected Software
Technical Details
The FasterXML jackson-databind library, specifically versions 2.x prior to 2.9.10.8, is vulnerable to a deserialization flaw. This issue stems from its improper handling of interactions between serialization gadgets and typing when processing serialized data. The specific gadget identified in this CVE is `com.oracle.wls.shaded.org.apache.xalan.lib.sql.JNDIConnectionPool`, which is an embedded Xalan dependency found in `org.glassfish.web/javax.servlet.jsp.jstl`. An attacker can craft malicious input that, when deserialized by a vulnerable jackson-databind instance, will instantiate this specific gadget class. The constructor or methods of this class can then invoke JNDI lookups or other operations with attacker-controlled parameters, leading to remote code execution (RCE) or other severe consequences by loading arbitrary classes or executing commands remotely.
What is the Impact of CVE-2020-35728?
Successful exploitation may allow attackers to achieve remote code execution, denial of service, or other system compromise by providing specially crafted serialized data.
What is the Exploitability of CVE-2020-35728?
Exploitation of this vulnerability requires the presence of the `JNDIConnectionPool` gadget (`com.oracle.wls.shaded.org.apache.xalan.lib.sql.JNDIConnectionPool`) on the application's classpath, in addition to a vulnerable jackson-databind version. The complexity for exploitation is moderate, as it involves crafting a specific serialized payload to trigger the gadget. No explicit authentication is typically needed to send the malicious payload if the deserialization endpoint is reachable externally. This is a remote attack. Privilege requirements depend on the context in which the application runs; the attacker's code would execute with the permissions of the vulnerable application. The existence of a proof-of-concept increases the likelihood of exploitation, particularly in environments where untrusted data is deserialized.
What are the Known Public Exploits?
| PoC Author | Link | Commentary |
|---|---|---|
| Al1ex | Link | CVE-2020-35728 & Jackson-databind RCE |
What are the Available Fixes for CVE-2020-35728?
About the Fix from Resolved Security
This patch adds "com.oracle.wls.shaded.org.apache.xalan.lib.sql.JNDIConnectionPool" to the blacklist of classes disallowed for polymorphic deserialization in Jackson. By blocking this class, the fix for CVE-2020-35728 prevents attackers from exploiting insecure deserialization that could lead to remote code execution via crafted JSON input.
Available Upgrade Options
- com.fasterxml.jackson.core:jackson-databind
- >2.0.0, <2.9.10.8 → Upgrade to 2.9.10.8
Struggling with dependency upgrades?
See how Resolved Security's drop-in replacements make it simple.
Book a demoAdditional Resources
- https://medium.com/%40cowtowncoder/on-jackson-cves-dont-panic-here-is-what-you-need-to-know-54cd0d6e8062
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://lists.debian.org/debian-lts-announce/2021/04/msg00025.html
- https://github.com/FasterXML/jackson-databind/commit/1ca0388c2fb37ac6a06f1c188ae89c41e3e15e84
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://www.oracle.com//security-alerts/cpujul2021.html
- https://github.com/FasterXML/jackson-databind/issues/2999
- https://www.oracle.com/security-alerts/cpuApr2021.html
- https://www.oracle.com/security-alerts/cpuapr2022.html
What are Similar Vulnerabilities to CVE-2020-35728?
Similar Vulnerabilities: CVE-2020-36186 , CVE-2017-7525 , CVE-2018-7489 , CVE-2019-12384 , CVE-2018-1000613
