YApi mongo Injection Vulnerability Alert

YApi mongo Injection Vulnerability Alert

novembro 12, 2022 | Jie Ji

Overview

Recently, NSFOCUS CERT detected that an open source API interface management platform YApi mongo injection vulnerability was publicly released on the Internet. Due to the splicing of a certain function in YApi, MongoDB injection can be realized. Unauthenticated remote attackers can exploit this vulnerability to obtain the user token (including necessary parameters such as user ID and project ID). At the same time, the command to be executed can be written in combination with the automated test API interface, and the sandbox can be used to escape, which will eventually lead to the execution of the command. At present, the official security patch has been released to fix this vulnerability. Affected users are requested to take protective measures as soon as possible.

YApi is an efficient, easy-to-use, and powerful open source API management platform that can provide developers, products, and testers with more elegant interface management services. Developers only need to use the interface data writing tools provided by the platform and simple clicks to realize the management of the interface.

Reference link:

https://github.com/YMFE/yapi/commit/59bade3a8a43e7db077d38a4b0c7c584f30ddf8c?diff=split

Scope of Impact

Affected version

  • YApi < 1.12.0

Unaffected version

  • YApi >= 1.12.0

Note: This version is not affected by the vulnerability in the default configuration.

Mitigation

Official upgrade

At present, the official security version has been released to fix this vulnerability, and it is recommended that affected users upgrade their protection in time.

https://github.com/YMFE/yapi/releases/tag/v1.12.0

https://github.com/YMFE/yapi/commit/59bade3a8a43e7db077d38a4b0c7c584f30ddf8c

Temporary measure

Access to the YAPI platform can be restricted without affecting business.

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 Technologies Group Co., Ltd., the company has operations in the Americas, Europe, the Middle East and Asia Pacific.