GHSA-mjw2-v2hm-wj34
HIGHGHSA-mjw2-v2hm-wj34 is a high-severity (CVSS 8.3) vulnerability in dagster-duckdb. O3 Security confirms whether GHSA-mjw2-v2hm-wj34 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Dagster Vulnerable to SQL Injection via Dynamic Partition Keys in Database I/O Manager Integrations
Real-World Exposure
dagster-duckdb🐍dagster-snowflake🐍dagster-gcp🐍dagster🐍dagster-deltalake🐍dagster-snowflake-polarsReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Summary
The DuckDB, Snowflake, BigQuery, and DeltaLake I/O managers constructed SQL WHERE clauses by interpolating dynamic partition key values into queries without escaping. A user with the Add Dynamic Partitions permission could create a partition key that injects arbitrary SQL, which would execute against the target database backend under the I/O manager's credentials.
Only deployments that use dynamic partitions are affected. Pipelines using static or time-window partitions are not impacted.
Impact
Dagster OSS: Any user with access to the Dagster API can create dynamic partition keys. Organizations should assess exposure based on who has API access in their deployment. Dagster is typically deployed in trusted environments where users who can manage partitions already have equivalent database access through other means.
Dagster+: In most Dagster+ deployments using default permission sets, the Add Dynamic Partitions permission is granted to users with an Editor role or above, who typically already have the ability to modify the affected tables and the asset code that accesses them.
The vulnerability is most relevant in deployments where this permission has been granted independently of broader database access, such as certain multi-tenant or custom RBAC configurations. In those cases, an affected user could read or modify data within the databases accessible to the I/O manager, beyond what their role would otherwise permit. Organizations should review which users hold this permission and assess their exposure accordingly.
Remediation
Update to the patched versions listed above. No configuration changes or workarounds are required alongside the update. Only your Dagster code version needs to be updated; the Dagster+ agent/Dagster OSS daemon/webserver do not need to be updated.
The fix ensures that partition key values are properly escaped before inclusion in SQL queries across all affected I/O managers.
If you are unable to apply the update, manual workarounds are described here.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | dagster-duckdb | all versions | 0.29.1 |
| 🐍PyPI | dagster-snowflake | all versions | 0.29.1 |
| 🐍PyPI | dagster-gcp | all versions | 0.29.1 |
| 🐍PyPI | dagster | all versions | 1.13.1 |
| 🐍PyPI | dagster-deltalake | all versions | 0.29.1 |
| 🐍PyPI | dagster-snowflake-polars | all versions | 0.29.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for dagster-duckdb. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update dagster-duckdb to 0.29.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-mjw2-v2hm-wj34 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-mjw2-v2hm-wj34 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-mjw2-v2hm-wj34. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-mjw2-v2hm-wj34 in your dependencies?
O3 detects GHSA-mjw2-v2hm-wj34 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.