/

CVE-2026-33858

Severity:

HIGH RISK

(8.8)

Unsafe Deserialization in Apache Airflow Webserver

CVE-2026-33858

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution within Airflow Webserver Context

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Apache Airflow contains an unsafe deserialization issue where specially crafted XCom payloads can cause the webserver to execute arbitrary code when they are read or rendered.

In practice, this becomes risky when a DAG author or other highly trusted principal can inject malicious XCom data that is later processed by the webserver process, leading to code execution in that context.

Affected context

The vulnerability occurs in Apache Airflow deployments where:

  • XCom payloads created by DAG tasks are serialized and later consumed by the webserver
  • The webserver deserializes or interprets XCom data in a way that can instantiate arbitrary objects or execute logic
  • DAG authors or other high-privilege users can influence XCom content beyond simple primitive types

The issue is scoped to Airflow environments where the trust boundary between task execution (workers) and the webserver is not strictly enforced for XCom payload handling.

Exploit preconditions

  • Attack surface: Logical interface via XCom payloads produced by DAG tasks and subsequently processed by the webserver.
  • Required access: Ability to define or modify DAGs and cause tasks to emit crafted XCom values (typically DAG author or equivalent role).
  • Trigger point: Any webserver operation that reads, deserializes, or displays the crafted XCom payload (e.g., UI views or background handlers).
  • Why exploitation is possible: XCom payloads are treated as trusted data and deserialized with mechanisms that can construct arbitrary objects or execute code, without robust validation or type restrictions at the webserver boundary.

Why this happens

This issue stems from treating XCom data as implicitly trusted across process boundaries and using a deserialization mechanism that can restore complex, executable object graphs.

When the webserver deserializes XCom content produced by task code, it effectively replays object construction or evaluation logic in a different security context.

This maps to CWE-502: Deserialization of Untrusted Data, where user-controlled or semi-trusted serialized data is processed in a way that can trigger arbitrary behavior during or immediately after deserialization.

Potential impact

  • Arbitrary code execution in the Airflow webserver process
  • Use of the webserver context to read or manipulate configuration, environment variables, or metadata accessible only to that process
  • Unauthorized modification of Airflow state, DAG metadata, or operational data via webserver-level access
  • Pivoting within the Airflow host or control plane, depending on the webserver's privileges and network reach

General mitigation guidance

Effective mitigation focuses on tightening how cross-component data such as XCom is represented and consumed:

  • Favor serialization formats and APIs that operate on primitive, well-defined data types (e.g., JSON-like structures) and avoid mechanisms capable of restoring arbitrary objects.
  • Constrain the types and shapes of data permitted in XCom payloads, enforcing explicit schemas or whitelisting safe types at both producer and consumer boundaries.
  • Isolate privileges between worker/task execution and the webserver; limit what the webserver can do even if it processes a malicious payload.
  • Reduce implicit trust in internal control-plane data and treat any data that crosses process boundaries as potentially unsafe, applying validation and filtering before use.
  • Apply least-privilege principles to the Airflow webserver runtime (filesystem, OS, and network permissions) so that impact is minimized if code is executed.

How teams detect issues like this

Organizations can look for this pattern through a mix of static and operational checks:

  • Static analysis or code search for deserialization APIs that restore arbitrary Python objects (or equivalents) when processing XCom or similar control-plane data.
  • Code review guidelines that flag any use of powerful serialization mechanisms for internal messages between components, especially where data originates from task code.
  • Security-focused tests that attempt to send unexpected or complex object payloads through XCom and verify that the webserver rejects or safely handles them.
  • Policy enforcement in CI/CD pipelines to prevent introduction of unsafe deserialization patterns around orchestration metadata and inter-process messages.

Sources

SourceLink
github.comgithub.com/apache/airflow/pull/64148
lists.apache.orglists.apache.org/thread/1npt3o2x81s0gw9tmfcv4n7p1z9hdmy0
openwall.comopenwall.com/lists/oss-security/2026/04/13/7

Frequently asked

questions

Typically no. Exploitation generally requires DAG author or equivalent privileges to craft XCom payloads, and the vulnerable behavior occurs within internal Airflow components rather than a public-facing endpoint.

An attacker would need the ability to define or modify DAGs and influence task code so that it emits specially crafted XCom data. This is usually restricted to highly trusted users in an Airflow deployment.

The safest pattern is to eliminate unsafe deserialization entirely for XCom and similar data, using serialization formats that cannot instantiate arbitrary objects and enforcing strict type or schema validation at the webserver boundary.

Treat all serialized data crossing process or privilege boundaries as untrusted, use safe serialization formats, prohibit generic object deserialization in code review policies, and integrate automated checks to flag risky deserialization APIs in orchestration and control-plane code paths.

Find out what's already
exploitable in your codebase.