Patchfirst
CVE-2023-32007 High · 8.8 EPSS 76.0%

Apache Spark: Shell command injection via Spark UI

Apache Software Foundation · Apache Spark

Summary

The flaw is a command injection vulnerability in the Spark UI of Apache Spark, reached through its access control checks when spark.acls.enable is set, where an impersonation path in HttpSecurityFilter lets user-supplied input flow into a Unix shell command. An attacker who can reach the Spark UI over the network and hold low-privileged credentials could exploit this without user interaction to run arbitrary shell commands as the user Spark runs as, provided ACLs are enabled and an authentication filter is in place.

Official description · CVE.org

** UNSUPPORTED WHEN ASSIGNED ** The Apache Spark UI offers the possibility to enable ACLs via the configuration option spark.acls.enable. With an authentication filter, this checks whether a user has access permissions to view or modify the application. If ACLs are enabled, a code path in HttpSecurityFilter can allow someone to perform impersonation by providing an arbitrary user name. A malicious user might then be able to reach a permission check function that will ultimately build a Unix shell command based on their input, and execute it. This will result in arbitrary shell command execution as the user Spark is currently running as. This issue was disclosed earlier as CVE-2022-33891, but incorrectly claimed version 3.1.3 (which has since gone EOL) would not be affected. NOTE: This vulnerability only affects products that are no longer supported by the maintainer. Users are recommended to upgrade to a supported version of Apache Spark, such as version 3.4.0.

Breakdown
26.1 / 100
Exploited
Not confirmed
Reports
0
Tactics
0/15

Disclosed on 2 May 2023. No public exploit code or confirmed exploitation is recorded.

See the family tree

2 related vulnerabilities in the same code over 9 months.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. CVE-2022-33891Spark Command Injection18 Jul 2022KEV
  2. relatedHigh

    Why these are linked:

    This CVECVE-2023-32007Spark: Shell command injection via Spark UI2 May 2023

techniques

No techniques linked

No ATT&CK techniques are linked to this CVE yet. MITRE CTID has not mapped it, and no report passage in the corpus ties it to a technique.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

2 packages in 2 ecosystems. Main package: org.apache.spark:spark-parent_2.12.

Mavenorg.apache.spark:spark-parent_2.12GHSA-59hw-j9g6-mfg3

Upgrade to 3.2.2 or later

Fixes this CVE and 1 other known vulnerability in this package (CVE-2022-33891).

Set the version to 3.2.2 or later in your pom.xml or build.gradle.

The first fix for CVE-2023-32007.

Affected versions

If you runUpgrade to
3.1.1 up to 3.2.23.2.2

“Up to” means the second version is the fix and is not affected.

Other packages that bundle this code (1)

Forks, repackagings and products that include the affected code. Each has its own fixed version.

  • PyPIpyspark
    Affected: All versions before 3.2.2Upgrade to 3.2.2 or later

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

References

4 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close