Security Resilience

CVE-2023-40195

RCE in Apache Airflow Spark Provider ≤ 4.1.3

Published
28 August 2023
Modified
23 April 2025
Patch / advisory
CVSS Score v3.1 8.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.019 79th percentile
Risk Priority 70 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2023-40195 is a high-severity Deserialization of Untrusted Data (CWE-502) vulnerability in Apache Airflow Spark Provider. Its CVSS base score is 8.8 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Software Extensions (T1176); ranked in the top 21% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Deserialization of Untrusted Data, Inclusion of Functionality from Untrusted Control Sphere vulnerability in Apache Software Foundation Apache Airflow Spark Provider. When the Apache Spark provider is installed on an Airflow deployment, an Airflow user that is authorized to configure Spark…

more

hooks can effectively run arbitrary code on the Airflow node by pointing it at a malicious Spark server. Prior to version 4.1.3, this was not called out in the documentation explicitly, so it is possible that administrators provided authorizations to configure Spark hooks without taking this into account. We recommend administrators to review their configurations to make sure the authorization to configure Spark hooks is only provided to fully trusted users. To view the warning in the docs please visit https://airflow.apache.org/docs/apache-airflow-providers-apache-spark/4.1.3/connections/spark.html

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1176 Software Extensions Persistence
Adversaries may abuse software extensions to establish persistent access to victim systems.
T1195.001 Compromise Software Dependencies and Development Tools Initial Access
Adversaries may manipulate software dependencies and development tools prior to receipt by a final consumer for the purpose of data or system compromise.
T1001.001 Junk Data Command And Control
Adversaries may add junk data to protocols used for command and control to make detection more difficult.
T1001.003 Protocol or Service Impersonation Command And Control
Adversaries may impersonate legitimate protocols or web service traffic to disguise command and control activity and thwart analysis efforts.
T1003.001 LSASS Memory Credential Access
Adversaries may attempt to access credential material stored in the process memory of the Local Security Authority Subsystem Service (LSASS).
T1003.005 Cached Domain Credentials Credential Access
Adversaries may attempt to access cached domain credentials used to allow authentication to occur in the event a domain controller is unavailable.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-41267Same vendor: Apache
CVE-2026-25747Same vendor: Apache
CVE-2024-22399Same vendor: Apache
CVE-2021-26295Same vendor: Apache
CVE-2026-71559Same vendor: Apache
CVE-2025-27522Same vendor: Apache
CVE-2023-51785Same vendor: Apache
CVE-2021-29200Same vendor: Apache
CVE-2024-42323Same vendor: Apache
CVE-2023-47248Same vendor: Apache

Affected Assets

apache
airflow spark provider
≤ 4.1.3

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 6 hardening rules · 6 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V14.2.3
  • V3.5.6
  • V9.1.3
  • V15.3.2

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-829 CWE-502

Isolated execution prevents functionality from an untrusted sphere from affecting the real environment, allowing safe behavioral inspection.

addresses: CWE-829 CWE-502

Detects and prevents inclusion of malicious functionality downloaded from untrusted control spheres.

addresses: CWE-502 CWE-829

Provenance of associated data allows detection of untrusted sources before deserialization or processing occurs.

addresses: CWE-502

Penetration testing supplies malicious serialized objects, detecting unsafe deserialization and supporting corrective actions.

addresses: CWE-829

Limiting P2P file sharing technology reduces inclusion of functionality or resources from untrusted external control spheres.

addresses: CWE-829

Enforcing installation policies prevents users from including functionality obtained from untrusted control spheres.

addresses: CWE-829

The inventory process requires identifying and recording the origin of all components, making inclusion of functionality from untrusted control spheres easier to detect during reviews.

addresses: CWE-829

Requiring approval and monitoring of maintenance tools prevents inclusion and execution of functionality obtained from untrusted sources.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

GV.SC-01 partial match
blocks

Supply-chain program directly governs inclusion of third-party executable code.

GV.SC-05 partial match
blocks

Contractual requirements can mandate trusted sources and integrity checks for included functionality.

GV.SC-07 partial match
blocks

Supplier risk assessment explicitly covers risks from their products and libraries.

ID.AM-02 partial match
blocks

Software inventory enables tracking of externally sourced components but does not itself enforce trust.

ID.RA-09 partial match
blocks

Pre-acquisition integrity/authenticity checks directly prevent inclusion of untrusted code.

ID.RA-10 partial match
blocks

Critical-supplier assessment reduces risk of importing executable functionality from untrusted parties.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

removes
removes
removes
removes
blocks

A.5.21's requirements to define/propagate security needs, obtain component origin/trust assurances, validate delivered products (incl. via testing), ensure genuine/unaltered components, and manage lifecycle directly stop most untrusted inclusion by shrinking the untrusted sphere before integration; bounded remainder exists for custom or insider-introduced functionality the clause does not reach.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (higher-evidence rows only; rows rated `none` are excluded).

Oracle Linux 8 (1 rule)
  • V-248635 Executable search paths within the initialization files of all local interactive OL 8 users must only contain paths that resolve to the system default or the user's home directory. blocks CWE-829
Oracle Linux 9 (1 rule)
  • V-271847 OL 9 must be configured so that executable search paths within the initialization files of all local interactive users must only contain paths that resolve to the system default or the users home directory. blocks CWE-829
RHEL 7 (1 rule)
  • V-204477 The Red Hat Enterprise Linux operating system must be configured so that all local interactive user initialization files executable search paths contain only paths that resolve to the users home directory. blocks CWE-829
RHEL 8 (1 rule)
  • V-230317 Executable search paths within the initialization files of all local interactive RHEL 8 users must only contain paths that resolve to the system default or the users home directory. blocks CWE-829
RHEL 9 (1 rule)
  • V-258050 Executable search paths within the initialization files of all local interactive RHEL 9 users must only contain paths that resolve to the system default or the users home directory. blocks CWE-829
Windows 10 (1 rule)
  • V-220737 Administrative accounts must not be used with applications that access the Internet, such as web browsers, or with potential Internet sources, such as email. blocks CWE-829

References