Apache Spark Shell Command Injection Vulnerability (CVE-2022-33891) Alerts

Apache Spark Shell Command Injection Vulnerability (CVE-2022-33891) Alerts

July 21, 2022 | Jie Ji

Overview

Recently, NSFOCUS CERT detected that Apache officially released a security bulletin and fixed a command injection vulnerability (CVE-2022-33891) in Apache Spark. Since the Apache Spark UI enables acl through the configuration option Spark.acl.enable, by using an authentication filter, it is possible to check if a user has access to view or modify the application. When the acl configuration is enabled, the code in the HttpSecurityFilter will allow some users to provide arbitrary usernames for impersonation. Attackers can use this function to construct Unix shell command requests to execute arbitrary shell commands. At present, the vulnerability EXP has been made public, and it has been detected that it is being exploited in the wild. Please take measures accordingly.

Apache Spark is a distributed open source processing system for big data workloads. It uses in-memory caching and optimized query execution for fast analytical queries on data of any size. It provides development APIs in Java, Scala, Python, and R, enabling code reuse across multiple workloads—batch processing, interactive querying, real-time analytics, machine learning, and graph processing, etc.

Reference link: https://lists.apache.org/thread/p847l3kopoo5bjtmxrcwk21xp6tjxqlc

Scope of Impact

Affected version

  • Apache Spark <= v3.0.3
  • 3.1.1 <= Apache Spark <= 3.1.2
  • 3.2.0 <= Apache Spark <= 3.2.1

Unaffected version

  • Apache Spark >= v3.1.3
  • Apache Spark >= v3.2.2
  • Apache Spark >= v3.3.0

Mitigation

Official upgrade

At present, the official has fixed the vulnerability in the latest version, and affected users are requested to upgrade the version as soon as possible for protection. The official download link: https://spark.apache.org/downloads.html

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.