# odbc apache airflow provider code execution vulnerability

Airflow ODBC provider let a connection's `driver` extra point to an attacker-supplied .so, so clicking Test loaded it and ran code as the Airflow user.

- Payout: $2,480
- Severity: medium
- Program: Internet Bug Bounty
- Found by (vendor credit): KmhlYXJ0
- Found by: kmhlyxj0
- Disclosed: 2023-08-26
- CVE: CVE-2023-34395
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/2065306
- Library page: https://bugbountylibrary.com/r/h1%3A2065306
- Tags: area:cloud domain:infra domain:web impact:privesc impact:rce kind:bounty platform:hackerone sev:medium tech:python technique:source-review vuln:misconfiguration vuln:privilege-escalation vuln:rce

**Target:** Apache Airflow ODBC provider (OdbcHook connection config)
**Root cause:** OdbcHook accepted the ODBC `driver` parameter from the user-editable connection extra, allowing an arbitrary shared library path to be loaded via dlopen during connection test.
**Steps:**
1. Compile a malicious ODBC driver .so (e.g. mysql-connector-odbc source with `system('touch /tmp/apache-ariflow-odbc')` in SQLDriverConnect) producing `libmyodbc8a.so`.
2. In Airflow UI Connection config, add `driver` in the extra field set to the path of the malicious .so.
3. Click the Test button; the driver is loaded and the embedded command executes, creating `/tmp/apache-ariflow-odbc`.
**How found:** Researcher recognized that the ODBC `driver` parameter is user-controllable via connection extra and that ODBC drivers are loaded as native libraries, then built a trojanized driver to confirm code execution on Test.
**Exploitation:** Any user able to create/edit an Airflow connection sets the `driver` extra to a path of a malicious shared object they placed on disk; triggering a connection test causes the ODBC layer to dlopen it, executing arbitrary code as the Airflow process user.
**Escalation:** Upgrades any local user to Airflow user privileges.
**Insight:** When a config field names a native library/driver path (ODBC, JDBC, DB drivers), treat it as a code-loading primitive: check whether the value is user-editable via connection extras rather than fixed in the hook constructor.

