AI analysis
Apache Airflow's Google provider built Google Drive search expressions by inserting file and folder names into single-quoted string literals without escaping the delimiting quote or backslash. A name containing an apostrophe ends the literal early and appends query clauses chosen by whoever controls that name. Those names are often not written by the Dag author; in a wildcard gcs_to_gdrive transfer they come from the source bucket listing, so a less-trusted principal who can create objects there can broaden the match, send an upload into a folder they named, or cause a download to return a file they placed because downloads select the most recently modified match. Deployments that pass externally sourced names to the Google Drive hook are affected. No public proof of concept is known, the issue is not on the CISA KEV list, and exploitation in the wild is not reported.
What to do: Upgrade apache-airflow-providers-google to 22.6.0 or later, which escapes quote and backslash characters in every value placed in a Drive query. Until that upgrade, do not pass externally sourced file or folder names into the Google Drive hook, and limit who can create objects in buckets used by wildcard gcs_to_gdrive transfers. Check recent Drive uploads and downloads for files or folders resolved from unexpected name matches.
Affected
| Apache Software Foundation apache-airflow-providers-google | versions before 22.6.0 |
Estimated exposure
moderatethousands of Airflow deployments (order of magnitude), only where external names reach the Drive hook — Apache Airflow and its Google provider are widely used in production data platforms, but only deployments that pass externally sourced names into the Drive hook (including wildcard gcs_to_gdrive from buckets writable by a less-trusted…
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description
Apache Airflow's Google provider built Google Drive search expressions by interpolating file and folder names directly into single-quoted string literals, without escaping the quote character that delimits them. A name containing an apostrophe therefore terminated the literal early and appended clauses of the attacker's choosing to the query. The names are frequently not written by the Dag author. In a wildcard `gcs_to_gdrive` transfer they come from the source bucket listing, so anyone able to create objects in that bucket controls them — typically an external data producer or an ingest-only service account, a different trust principal from the Dag author. An injected clause can broaden the match and so steer which file or folder the hook resolves: an upload can be directed into a folder the attacker named, and, because downloads select the most recently modified match, a download can return a file they placed rather than the one the Dag asked for. Affects deployments passing externally-sourced names to the Google Drive hook, including wildcard `gcs_to_gdrive` transfers from buckets writable by less-trusted principals. Users are advised to upgrade to `apache-airflow-providers-google` `22.6.0` or later, which escapes quote and backslash characters in every value interpolated into a Drive query.