Description
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.
Published: 2026-08-21
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary code execution
Action: Immediate Patch
AI Analysis

Impact

Hydra, a framework for configuring complex applications, has a vulnerability in the hydra.utils.instantiate function that allows attacker-controlled configuration values to be resolved and executed. The flaw arises from the _resolve_target() logic, which accepts target names and arguments from untrusted inputs and calls the corresponding Python objects. This leads to arbitrary code execution in the process, enabling an attacker to read or modify files, leak credentials, or terminate the application. The weakness is classified under CWE-470 (Use of a Dangerous Class) and CWE-94 (Improper Control of Generation of Code).

Affected Systems

The issue affects all releases of Hydra before version 1.3.4 produced by Facebook Research. Any application, library, or command‑line flow that incorporates Hydra and feeds untrusted configuration, CLI overrides, or model metadata into hydra.utils.instantiate() is potentially vulnerable.

Risk and Exploitability

The CVSS score for this vulnerability is 7.8, indicating a high severity. The EPSS score is not available, but the flaw’s high severity suggests that exploitation could be attempted once the attacker can supply arbitrary configuration. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is through untrusted configuration files or command‑line overrides that are processed by hydra.utils.instantiate, allowing an attacker to specify dangerous callables and arguments.

Generated by OpenCVE AI on August 21, 2026 at 21:35 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Hydra to version 1.3.4 or later, which includes target blocking and an allowlist escape hatch.
  • If upgrading immediately is not feasible, remove or sanitize any untrusted configuration before it is passed to hydra.utils.instantiate; do not expose this function to external input sources.
  • Configure target blocking by setting the HYDRA_INSTANTIATE_ALLOWLIST_OVERRIDE environment variable or equivalent mechanism to restrict allowed callables and arguments, reducing the risk of arbitrary code execution.

Generated by OpenCVE AI on August 21, 2026 at 21:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-2cp2-2r3c-7p7r Hydra: hydra.utils.instantiate with untrusted config can lead to code execution
History

Sun, 23 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Facebookresearch
Facebookresearch hydra
Vendors & Products Facebookresearch
Facebookresearch hydra

Fri, 21 Aug 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 21 Aug 2026 20:30:00 +0000

Type Values Removed Values Added
Description 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.
Title Hydra: hydra.utils.instantiate with untrusted config can lead to code execution
Weaknesses CWE-470
CWE-94
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}


Subscriptions

Facebookresearch Hydra
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T21:43:13.889Z

Reserved: 2026-07-30T16:19:08.081Z

Link: CVE-2026-68508

cve-icon Vulnrichment

Updated: 2026-08-21T21:00:07.316Z

cve-icon NVD

Status : Deferred

Published: 2026-08-21T21:17:02.963

Modified: 2026-09-09T21:06:39.057

Link: CVE-2026-68508

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-23T16:40:45Z

Weaknesses
  • CWE-470

    Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection')

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')