# Leak of sensitive values to Airflow rendered template

Airflow UI showed unmasked connection passwords in rendered templates for tasks skipped by depends_on_past after a prior failure, leaking secrets.

- Payout: $480
- Severity: low
- Program: Internet Bug Bounty
- Found by: jrs53
- Disclosed: 2022-12-27
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/1773895
- Library page: https://bugbountylibrary.com/r/h1%3A1773895
- Tags: area:web domain:web impact:data-leak kind:bounty platform:hackerone sev:low tech:python technique:race-window vuln:info-disclosure vuln:secrets-leak

**Target:** Apache Airflow web UI rendered template view
**Root cause:** Secret masking is applied during task execution/log rendering, but the rendered template for a task that never executed (skipped due to depends_on_past after prior failure) is rendered without the masking step.
**Steps:**
1. Create Airflow connection `secret` with a password.
2. Define DAG with t1 BashOperator `echo {{ conn.secret.password }}` and t2 with `depends_on_past=True` and same command.
3. Trigger DAG; observe masked output in rendered template and logs.
4. Change t2 command to `fail {{ conn.secret.password }}` and trigger; t2 fails, output masked.
5. Trigger again without changes; t1 runs, t2 skipped (not started).
6. Open t2 in graph view and view rendered template: password shown unmasked.
**How found:** User noticed that after a task failed and was then skipped due to depends_on_past, the rendered template view showed the secret unmasked, hypothesizing a race between task skipping and the masking code.
**Exploitation:** An authenticated Airflow UI user views the rendered template of a skipped task to read the raw connection password that should have been masked.
**Insight:** Masking applied at execution/log time can be bypassed on code paths where the task never executes but its template is still rendered for the UI; test skipped/queued/upstream-failed states for secret exposure.

