天下漏洞,尽知其名
MEDIUM 重点关注

CVE-2026-86843 Apache Airflow Teradata provider 示例 DAG SQL 注入漏洞

影响低权限用户可注入SQL并劫持任务连接执行任意语句

AI 研判

Apache Airflow 的 Teradata provider 示例 DAG 将全部 DAG Params 声明为无约束自由文本,并直接模板化传入 compute-cluster 算子,最终拼接进 Teradata DDL。具备触发该 DAG 权限的低信任用户可借此注入 SQL 片段,并因 connection id 也是自由文本参数而将任务重定向到部署中的任意连接。仅运行该示例 DAG 或其复制版本的部署受影响,provider 算子代码本身未变。

影响范围

Apache Airflow Teradata provider

apache-airflow-providers-teradata 3.7.0 之前的版本,且仅当部署运行该示例 DAG 或从其复制的 DAG 时受影响;具体受影响版本范围以官方公告为准。

漏洞详情

漏洞属于 SQL 注入/参数注入类问题。示例 DAG 未对 Params 做类型与取值约束,用户输入被直接插值进 Teradata DDL 语句,从而可执行任意 SQL 片段。同时 connection id 也是自由文本参数,攻击者可把任务指向部署中其他连接,扩大影响面。

利用条件与风险

利用前提是攻击者拥有触发该示例 DAG 的权限,无需自身持有 Teradata 凭据。实战中可导致以任务所用连接身份执行 SQL、越权访问其他数据源,风险取决于该连接的权限。

修复建议

官方建议升级 apache-airflow-providers-teradata 至 3.7.0 或更高版本,新版本将 Params 限制为经校验的标识符和封闭取值集,并移除触发时的连接选择与自由格式选项字符串。已复制该示例 DAG 的用户需自行对副本施加相同约束;临时缓解可限制该 DAG 的触发权限或停用该示例 DAG。

原始情报

The Apache Airflow Teradata provider’s compute-cluster example Dag declared every one of its Dag Params as unconstrained free text and templated them straight into the compute-cluster operators, which interpolate those values into Teradata DDL. A user who is permitted to trigger that Dag – a lower-trust role than the Dag author, and one that needs no Teradata credentials of its own – could therefore supply SQL fragments that execute under the connection the task runs as, and could additionally redirect the task at any other connection defined in the deployment, because the connection id was itself a free-text Param. Only deployments that run this example Dag, or a Dag copied from it, are affected; the provider’s operator code is unchanged. Users of apache-airflow-providers-teradata are recommended to upgrade to version 3.7.0 or later, whose example constrains the Params to validated identifiers and a closed value set and removes connection selection and free-form option strings from trigger-time input. Upgrading does not change a Dag already copied from the example; users who copied it should apply the same constraints to their copy.