Fastjson Remote Denial-of-Service Vulnerability Threat Alert

Fastjson Remote Denial-of-Service Vulnerability Threat Alert

setembro 30, 2019 | Adeline Zhang
  1. Vulnerability Description

Recently, multiple versions of fastjson have been found to contain a remote denial-of-service (DoS) vulnerability. An attacker could exploit a flaw in the processing logic of fastjson to exhaust memory and CPU resources of the server via a maliciously crafted json string, leading to a denial of service.

Fastjson is an open-source JSON library developed by Alibaba to parse JOSN 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. Fastjson users are advised to upgrade to an appropriate fixed version as soon as possible to protect against this vulnerability.

Reference:

https://github.com/alibaba/fastjson/commit/995845170527221ca0293cf290e33a7d6cb52bf7

  1. Scope of Impact

Affected Versions

  • fastjson < 1.2.60

Unaffected Versions

  • fastjson = 1.2.60
  • fastjson = 1.1.31.sec07
  • fastjson = 1.1.33.sec06
  • fastjson = 1.1.34.sec06
  • fastjson = 1.1.46.sec06
  • fastjson = 1.2.7.sec06
  • fastjson = 1.2.8.sec06
  • fastjson = 1.2.29.sec06

Note: A very early version of fastjson, when upgraded to version 1.2.60, may have compatibility issues. It is recommended that users of such versions install appropriate bug fixes for specific sec06 versions.

  1. Mitigation

3.1 Official Fix

  • Alibaba has released a security bulletin. Affected users are advised to immediately upgrade to the following fixed versions:
Fixed Version Number Download Link
1.2.60 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.2.60/
1.1.31.sec07 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.1.31.sec07/
1.1.33.sec06 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.1.33.sec06/
1.1.34.sec06 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.1.34.sec06/
1.1.46.sec06 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.1.46.sec06/
1.2.7.sec06 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.2.7.sec06/
1.2.8.sec06 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.2.8.sec06/
1.2.29.sec06 http://repo1.maven.org/maven2/com/alibaba/fastjson/1.2.29.sec06/

 

The upgrade procedure is as follows:

(1) Back up the dependency library of the current fastjson in case the upgrade fails.

(2) Replace the fastjson library with that of a fixed version.

  • Update Maven’s dependency configuration:

Update Maven’s dependency configuration by changing the current fastjson version to the latest version. The following uses the latest version 1.2.60 as an example:

<dependency>

<groupId>com.alibaba</groupId>

<artifactId>fastjson</artifactId>

<version>1.2.60</version>

</dependency>

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.