Fastjson 1.2.62 and Earlier Remote Code Execution Vulnerability Threat Alert

Fastjson 1.2.62 and Earlier Remote Code Execution Vulnerability Threat Alert

março 11, 2020 | Mina Hao

Vulnerability Description

On February 19, National Vulnerability Database (NVD) released a JNDI injection vulnerability (CVE-2020-8840) in jackson-databind. However, gadget deserialization in jackson-databind also affects Fastjson. According to researchers from NSFOCUS, when the AutoType fucntion is enabled (disabled by default), this vulnerability affects Fastjson 1.2.62, allowing attackers to result in remote arbitrary code execution on the target machine.

Fastjson is an open-source JSON library developed by Alibaba to parse JSON strings. It can be used to serialize JavaBean into a JSON string and deserialize a JSON string to JavaBean. Fastjson works efficiently and therefore is widely used. Users should take preventive measures as soon as possible.

Scope of Impact

Affected Versions

  • Fastjson <= 1.2.62

Mitigation

  • Workarounds

 

Currently, there has been no official release to fix this vulnerability. Affected users that have enabled the AutoType function (disabled by default) can disable it and upgrade JDK to the latest version for risk aversion.

Users can disable the AutoType function in either of the following ways:

Method I:

  1. Find the following code in the source code and delete it:

ParserConfig.getGlobalInstance().setAutoTypeSupport(true);

Method 2:

  1. When enabling Fastjson on a Java virtual machine, remember not to add the following parameter:

-Dfastjson.parser.autoTypeSupport=true

Users are advised to check the vendor’s official website from time to time so as to get the related patch as soon as possible.

  • Protection with Security Products

NSFOCUS Web Application Firewall (WAF)’s legacy protection rule (27004899) can protect against this vulnerability. Users should update protection rules on the device as soon as possible for vulnerability protection.

Statement

This advisory is only used to describe a potential risk. NSFOCUS does not provide any commitment or promise on this advisory. NSFOCUS and the author will not bear any liability for any direct and/or indirect consequences and losses caused by transmitting and/or using this advisory. NSFOCUS reserves all the rights to modify and interpret this advisory. Please include this statement paragraph when reproducing or transferring this advisory. Do not modify this advisory, add/delete any information to/from it, or use this advisory for commercial purposes without permission from NSFOCUS.

About NSFOCUS

NSFOCUS, Inc., a global network and cyber security leader, protects enterprises and carriers from advanced cyber attacks. The company’s Intelligent Hybrid Security strategy utilizes both cloud and on-premises security platforms, built on a foundation of real-time global threat intelligence, to provide multi-layered, unified and dynamic protection against advanced cyber attacks.

NSFOCUS works with Fortune Global 500 companies, including four of the world’s five largest financial institutions, organizations in insurance, retail, healthcare, critical infrastructure industries as well as government agencies. NSFOCUS has technology and channel partners in more than 60 countries, is a member of both the Microsoft Active Protections Program (MAPP), and the Cloud Security Alliance (CSA).

A wholly owned subsidiary of NSFOCUS Information Technology Co. Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.