/

CVE-2026-111422

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) in Airflow SSH Jobs

CVE-2026-111422

Awaiting Analysis

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Command Execution

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

A command injection vulnerability in Apache Airflow's SSH provider allows shell syntax in templated environment values to execute on the remote SSH host. The issue becomes risky when a user who can trigger a DAG can supply input such as params or dag_run.conf that is passed into the operator's environment parameter.

A command injection vulnerability in Apache Airflow's SSH provider allows shell syntax in templated environment values to execute on the remote SSH host. The issue becomes risky when a user who can trigger a DAG can supply input such as params or dag_run.conf that is passed into the operator's environment parameter.

Affected context

The vulnerability occurs in Airflow deployments using the SSHRemoteJobOperator with an SSH provider version that incorrectly quotes templated environment values. Risk is present when DAGs pass trigger-time or otherwise user-controlled data into the operator's environment parameter and the resulting wrapper script is executed on a remote SSH host.

The vulnerability occurs in Airflow deployments using the SSHRemoteJobOperator with an SSH provider version that incorrectly quotes templated environment values. Risk is present when DAGs pass trigger-time or otherwise user-controlled data into the operator's environment parameter and the resulting wrapper script is executed on a remote SSH host.

Exploit preconditions

  • Attack surface: An Airflow DAG using SSHRemoteJobOperator and a remote SSH connection
  • Required access: Permission to trigger the affected DAG, without requiring DAG-authoring privileges
  • Trigger point: Rendering and execution of the remote wrapper script
  • Input condition: User-controlled values from sources such as params or dag_run.conf must flow into the templated environment parameter
  • Why exploitation is possible: Values are quoted only once even though they are inserted into an already-quoted shell wrapper, allowing shell command-substitution syntax to be interpreted remotely
  • Attack surface: An Airflow DAG using SSHRemoteJobOperator and a remote SSH connection
  • Required access: Permission to trigger the affected DAG, without requiring DAG-authoring privileges
  • Trigger point: Rendering and execution of the remote wrapper script
  • Input condition: User-controlled values from sources such as params or dag_run.conf must flow into the templated environment parameter
  • Why exploitation is possible: Values are quoted only once even though they are inserted into an already-quoted shell wrapper, allowing shell command-substitution syntax to be interpreted remotely

Why this happens

The underlying bug is incomplete shell escaping of templated data. The operator places environment values inside a quoted wrapper script but applies quoting only once, leaving specially crafted shell syntax capable of being interpreted by the remote shell.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because data supplied through a templated parameter can cross the boundary into command interpretation.

The underlying bug is incomplete shell escaping of templated data. The operator places environment values inside a quoted wrapper script but applies quoting only once, leaving specially crafted shell syntax capable of being interpreted by the remote shell.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because data supplied through a templated parameter can cross the boundary into command interpretation.

Potential impact

  • An attacker may execute arbitrary commands on the remote host
  • Commands could run with the privileges of the SSH connection user
  • Sensitive files, credentials, or application data could be accessed
  • The remote host may be modified or used for lateral movement
  • Airflow workflows or downstream systems could be disrupted
  • An attacker may execute arbitrary commands on the remote host
  • Commands could run with the privileges of the SSH connection user
  • Sensitive files, credentials, or application data could be accessed
  • The remote host may be modified or used for lateral movement
  • Airflow workflows or downstream systems could be disrupted

General mitigation guidance

Mitigation generally focuses on preventing untrusted values from becoming shell-interpreted content.

Common defensive patterns include:

  • Apply the vendor's security fix through the organization's normal dependency-management process
  • Avoid passing trigger-time or user-controlled input directly into shell-sensitive environment values
  • Use structured execution interfaces that do not construct commands through shell interpolation
  • Apply context-appropriate escaping at the final command boundary, rather than relying only on earlier templating
  • Restrict which users can trigger sensitive DAGs and limit the privileges of SSH connection accounts
  • Store credentials separately from templated workflow inputs and avoid exposing them to remote command environments

Mitigation generally focuses on preventing untrusted values from becoming shell-interpreted content.

Common defensive patterns include:

  • Apply the vendor's security fix through the organization's normal dependency-management process
  • Avoid passing trigger-time or user-controlled input directly into shell-sensitive environment values
  • Use structured execution interfaces that do not construct commands through shell interpolation
  • Apply context-appropriate escaping at the final command boundary, rather than relying only on earlier templating
  • Restrict which users can trigger sensitive DAGs and limit the privileges of SSH connection accounts
  • Store credentials separately from templated workflow inputs and avoid exposing them to remote command environments

How teams detect issues like this

Detection can combine dependency analysis with workflow and code review controls:

  • Identify affected SSH provider dependency ranges in lockfiles and deployment manifests
  • Search DAG source for SSHRemoteJobOperator usage with templated environment values
  • Trace params, dag_run.conf, API inputs, or other user-controlled data into shell-facing operator fields
  • Review wrapper-script construction and escaping behavior at the final remote execution boundary
  • Use static analysis or automated review rules to flag shell interpolation, command substitution, and untrusted template data
  • Enforce workflow policies that restrict trigger permissions for DAGs invoking privileged remote hosts

Detection can combine dependency analysis with workflow and code review controls:

  • Identify affected SSH provider dependency ranges in lockfiles and deployment manifests
  • Search DAG source for SSHRemoteJobOperator usage with templated environment values
  • Trace params, dag_run.conf, API inputs, or other user-controlled data into shell-facing operator fields
  • Review wrapper-script construction and escaping behavior at the final remote execution boundary
  • Use static analysis or automated review rules to flag shell interpolation, command substitution, and untrusted template data
  • Enforce workflow policies that restrict trigger permissions for DAGs invoking privileged remote hosts

Sources

SourceLink
airflow.apache.orgairflow.apache.org/docs/apache-airflow-providers-ssh/7.0.1/changelog.html
github.comgithub.com/apache/airflow/pull/74810
lists.apache.orglists.apache.org/thread/k159xrq1tbgmkvl24j63g12qh0mczk79
openwall.comopenwall.com/lists/oss-security/2026/10/26/20

Frequently asked

questions

Yes, within the deployment's access model. A user who can trigger a vulnerable DAG may be able to cause command execution on the configured remote SSH host without authoring or modifying the DAG.

The key requirement is permission to trigger a DAG that passes attacker-influenced values into the templated environment parameter. The resulting commands execute with the privileges of the SSH connection user.

Use the vendor-provided security fix, prevent untrusted values from reaching shell-interpreted fields, and prefer structured remote execution mechanisms that avoid shell interpolation.

Treat workflow trigger data as untrusted, enforce strict input validation, review template-to-shell data flows, restrict DAG-trigger permissions, and use least-privilege SSH accounts.

Yes, within the deployment's access model. A user who can trigger a vulnerable DAG may be able to cause command execution on the configured remote SSH host without authoring or modifying the DAG.

The key requirement is permission to trigger a DAG that passes attacker-influenced values into the templated environment parameter. The resulting commands execute with the privileges of the SSH connection user.

Use the vendor-provided security fix, prevent untrusted values from reaching shell-interpreted fields, and prefer structured remote execution mechanisms that avoid shell interpolation.

Treat workflow trigger data as untrusted, enforce strict input validation, review template-to-shell data flows, restrict DAG-trigger permissions, and use least-privilege SSH accounts.

Find out what's already
exploitable in your codebase.