Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-106440 Overview
CVE-2026-106440 is an unsafe reflection vulnerability [CWE-470] in Hydra, a framework for configuring complex Python applications. The flaw resides in the hydra-optuna-sweeper package, which accepts a configuration-controlled dotted path in hydra.sweeper.custom_search_space and resolves it through hydra.utils.get_method(). Because get_method() is a trusted-input lookup helper, it bypasses the execution policy enforced by instantiate(). An attacker who controls the Optuna sweep configuration or command-line overrides can select arbitrary importable Python code for execution with the application's privileges.
Critical Impact
Attackers controlling sweep configuration can execute arbitrary Python code and bypass the trusted execution whitelist on Hydra 1.4 development releases.
Affected Products
- Hydra framework versions 1.2.0 through versions prior to 1.3.0
- Hydra 1.4.0 development releases prior to 1.4.0.dev10
- hydra-optuna-sweeper plugin package consuming vulnerable Hydra versions
Discovery Timeline
- 2026-10-06 - CVE-2026-106440 published to NVD
- 2026-10-06 - Last updated in NVD database
Technical Details for CVE-2026-106440
Vulnerability Analysis
The vulnerability is classified as Unsafe Reflection [CWE-470]. The Optuna sweeper plugin reads the hydra.sweeper.custom_search_space configuration value and passes it directly to hydra.utils.get_method(). This helper is intentionally permissive because it is meant for trusted-input lookups by Hydra internals. The Hydra controller process then invokes the returned callable without applying the restrictive execution policy that instantiate() normally enforces. An attacker who can influence sweep configuration files, YAML overrides, or command-line arguments can therefore point the dotted path at any importable callable within the Python environment.
Root Cause
The root cause is the use of a trusted-input resolver (get_method()) to process attacker-influenceable configuration data. Unlike instantiate(), which routes targets through the ExecutionWhitelist and policy checks defined in hydra/_internal/target_policy.py, get_method() performs a direct import and attribute lookup. On Hydra 1.4 development releases, this path also sidesteps the execution whitelist designed to constrain callable targets.
Attack Vector
Exploitation requires local access and user interaction, consistent with the attack vector where an operator launches a Hydra application with attacker-supplied configuration. A malicious sweep configuration or an injected hydra.sweeper.custom_search_space=package.module.callable override redirects execution to any importable callable. The callable executes under the privileges of the Hydra application, enabling arbitrary code execution within the training or orchestration host.
# Security patch — hydra/_internal/instantiate/_instantiate2.py
# Source: https://github.com/hydra-ecosystem/hydra/commit/0dd18084589a3d3e577d1f1a8a48fb485c94a5e6
from hydra._internal.deprecation_warning import deprecation_warning
-from hydra._internal.target_policy import (
+from hydra._internal.execution_policy import (
+ UNSAFE_DISABLE_EXECUTION_CHECKS,
ExecutionWhitelist,
NormalizedExecutionWhitelist,
_authorize_discovery_path,
_authorize_resolved_target_identity,
_authorize_target_invocation,
_authorize_target_name,
_DeferredTarget,
- _get_effective_target_invocation,
+ _execution_policy_context,
+ _get_active_execution_policy,
_get_os_alias_target,
_get_resolved_target_name_for_check,
_mediate_target_result,
+ _reject_protected_reference,
_resolve_execution_whitelist,
+ _validated_execution_policy,
_with_full_key,
)
from hydra._internal.utils import _locate
The patch renames target_policy to execution_policy and introduces explicit policy context management, policy validation, and protected-reference rejection to ensure callable resolution routes through authorization checks.
Stop Remote Code Execution Before It Runs
Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.
Stop Exploit AttemptsDetection Methods for CVE-2026-106440
Indicators of Compromise
- Hydra configuration files or command-line overrides that set hydra.sweeper.custom_search_space to a dotted path outside the expected sweeper module namespace.
- Unexpected Python module imports originating from the Hydra controller process, particularly imports of os, subprocess, or network modules not referenced by the application.
- Child processes spawned by Hydra sweeper runs that do not match legitimate Optuna trial execution patterns.
Detection Strategies
- Audit Hydra YAML configurations and shell history for custom_search_space overrides that reference non-sweeper modules.
- Inspect installed Hydra versions across ML development and CI environments to identify versions between 1.2.0 and 1.3.0, as well as 1.4.0 pre-release builds before 1.4.0.dev10.
- Correlate Hydra process execution with unexpected outbound connections or filesystem writes outside the configured output directory.
Monitoring Recommendations
- Enable Python audit hooks (sys.addaudithook) in production Hydra workloads to log import and exec events for forensic review.
- Monitor source control for changes to Hydra configuration directories that introduce dotted paths resolved by get_method().
- Log all command-line arguments passed to Hydra entry points so configuration-override abuse can be reconstructed.
How to Mitigate CVE-2026-106440
Immediate Actions Required
- Upgrade Hydra to version 1.3.0 or later, or to 1.4.0.dev10 or later on the 1.4 development branch.
- Restrict write access to Hydra configuration directories and sweep configuration files to trusted maintainers only.
- Treat command-line overrides as untrusted when Hydra is invoked by shared tooling, CI jobs, or multi-tenant job schedulers.
Patch Information
The fix is published in Hydra 1.3.0 and 1.4.0.dev10. The remediation refactors hydra/_internal/target_policy.py into hydra/_internal/execution_policy.py and routes callable resolution through policy authorization checks, as shown in the GitHub Security Advisory GHSA-5jjj-9xc3-rm56 and the GitHub Release v1.3.7. Review the upstream commit 0dd18084 and commit 4720dfca for the complete code changes.
Workarounds
- Remove or hard-code the hydra.sweeper.custom_search_space key in sweep configurations so operators cannot override it from the command line.
- Run Hydra applications in least-privilege containers or sandboxed accounts to limit the impact of callable execution.
- Disable the hydra-optuna-sweeper plugin in environments where it is not required until the upgrade is applied.
# Verify installed Hydra version and upgrade
pip show hydra-core | grep -i version
pip install --upgrade 'hydra-core>=1.3.0' 'hydra-optuna-sweeper'
# Audit project configs for attacker-controllable dotted paths
grep -R "custom_search_space" ./conf ./configs 2>/dev/null
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

