# CVE-2025-54415: dag-factory's CI/CD Workflow Allows for Repository Takeover and Secret Exfiltration

> Attackers can execute arbitrary code in CI/CD runners to steal secrets and take over the repository via a misconfigured pull_request_target workflow.

- **Severity:** Critical 9.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:U`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 26 Jul 2025
- **Updated:** 28 Jul 2025
- **Also known as:** GHSA-g5hx-xv45-9whg

## What is CVE-2025-54415?

CVE-2025-54415 is a critical command injection vulnerability in astronomer dag-factory, published on 26 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

dag-factory is a library for Apache Airflow® to construct DAGs declaratively via configuration files. In versions 0.23.0a8 and below, a high-severity vulnerability has been identified in the cicd.yml workflow within the astronomer/dag-factory GitHub repository. The workflow, specifically when triggered by pull_request_target, is susceptible to exploitation, allowing an attacker to execute arbitrary code within the GitHub Actions runner environment. This misconfiguration enables an attacker to establish a reverse shell, exfiltrate sensitive secrets, including the highly-privileged GITHUB_TOKEN, and ultimately gain full control over the repository. This is fixed in version 0.23.0a9.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2025-54415?


## How do I fix CVE-2025-54415?

No fix has been published for CVE-2025-54415 yet. Limit exposure of the affected software until one is available.

## Is CVE-2025-54415 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54415 exists.

Public exploit code:

- Authorized security-research reproduction lab for CVE-2025-54415 (GHSA-g5hx-xv45-9whg): astronomer/dag-factory snapshot at 464c75a — pull_request_target head-SHA checkout executes attacker-controlled hatch scripts in base-repo context (github_poc): https://github.com/pvharmo2/gha-lab-f894926966

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-54415 and fix it if it is affected.

What it is: CVE-2025-54415 is a critical command injection vulnerability in astronomer dag-factory, published on 26 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-54415 exists.

Affected product: astronomer dag-factory. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-54415/ (Markdown: https://insights.sbomify.com/CVE-2025-54415/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-54415
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-54415
- OSV: https://osv.dev/vulnerability/CVE-2025-54415

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-54415/
Summaries are generated and may contain mistakes; the official description above is the record.
