Hydra
Hydra: hydra.utils.instantiate with untrusted config can lead to code execution
Hydra is a framework for elegantly configuring complex applications. Prior to 1.3.4, hydra.utils.instantiate() resolves and calls Python objects selected by configuration through _resolve_target() in hydra/_internal/instantiate/_instantiate2.py, allowing attacker-controlled target values and arguments to choose dangerous callables. A consuming application, library, CLI workflow, or model loader that passes untrusted configuration, CLI overrides, or model metadata into hydra.utils.instantiate() can therefore execute arbitrary code in its own process, including reading or modifying files and credentials or terminating the process. Version 1.3.4 adds target blocking with an explicit HYDRA_INSTANTIATE_ALLOWLIST_OVERRIDE escape hatch. This issue is fixed in version 1.3.4.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.3.4
Fixed in 1.3.4
Mitigation
Upgrade hydra to 1.3.4 or later.
References
- Vendor advisory github.com/hydra-ecosystem/hydra/security/advi…
- Patch github.com/hydra-ecosystem/hydra/pull/3261
- Patch github.com/hydra-ecosystem/hydra/commit/7faad0…
1 more
- Release notes github.com/hydra-ecosystem/hydra/releases/tag/…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.