# CVE-2026-68508: Hydra: hydra.utils.instantiate with untrusted config can lead to code execution

> Attackers can execute arbitrary code by passing untrusted configuration to hydra.utils.instantiate, affecting applications using this Python library.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 21 Aug 2026
- **Updated:** 21 Aug 2026
- **Also known as:** GHSA-2cp2-2r3c-7p7r, PYSEC-2026-3850

## What is CVE-2026-68508?

CVE-2026-68508 is a high-severity code injection vulnerability in facebookresearch hydra, published on 21 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official 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.

Weakness: CWE-94 (Improper Control of Generation of Code), CWE-470 (Use of Externally-Controlled Input to Select Classes or Code)

## Which versions are affected by CVE-2026-68508?

3 open source packages ship an affected version, including hydra-core.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hydra-core` | PyPI | All versions | 1.3.4 |
| `hydra-core` | PyPI | All versions | 1.3.4 |
| `hydra-core` | PyPI | All versions | 1.3.4 |

## How do I fix CVE-2026-68508?

Upgrade hydra-core to 1.3.4 or later.

## Is CVE-2026-68508 being exploited?

There is no known exploitation of CVE-2026-68508 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-68508 and fix it if it is affected.

What it is: CVE-2026-68508 is a high-severity code injection vulnerability in facebookresearch hydra, published on 21 Aug 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-68508 in the wild and no public exploit code.

Affected packages and fixed versions:
- hydra-core (PyPI): affected all versions; fixed in 1.3.4
- hydra-core (PyPI): affected all versions; fixed in 1.3.4
- hydra-core (PyPI): affected all versions; fixed in 1.3.4

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-2026-68508/ (Markdown: https://insights.sbomify.com/CVE-2026-68508/index.md)
```

## Sources

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

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