Skip to main content

Hydra Optuna Sweeper CVE-2026-106440

| EUVDEUVD-2026-93661 HIGH
Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') (CWE-470)
2026-10-06 GitHub_M GHSA-5jjj-9xc3-rm56
7.8
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply malicious Optuna sweep config or CLI override
  2. Delivery
    Point custom_search_space at importable Python code
  3. Exploit
    Victim runs sweep, get_method() resolves path
  4. Execution
    Callable invoked, bypassing execution whitelist
  5. Impact
    Arbitrary code execution with application privileges

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V15 - Secure Coding and Architecture Reflection safety, class allowlisting
Exploitation Conditions

Requires the hydra-optuna-sweeper package installed and in use with hydra.sweeper.custom_search_space configured, on an affected version (1.2.0 up to but not including 1.3.0, and 1.4.0 dev builds before 1.4.0.dev10). The attacker must control the Optuna sweep configuration or command-line overrides fed to the application, and a user must actually launch the sweep (UI:R). Exploitation is limited to deployments where sweep configuration crosses a trust boundary (untrusted/externally-sourced configs or overrides); where only the operator supplies configuration, the flaw adds no capability beyond what that operator already has. Local delivery of the configuration is assumed (AV:L); it does not affect default Hydra installs that do not use the Optuna sweeper or the custom_search_space feature.

Impact

The CVSS 3.1 vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H = 7.8 High) describes a local, low-complexity vulnerability that yields full confidentiality, integrity, and availability impact once triggered, but requires user interaction (a victim actually running the sweep). This is a classic CWE-470 unsafe-reflection flaw: configuration-controlled input selects importable Python code that get_method() invokes without the execution-policy checks instantiate() applies. No EPSS score was supplied, the CVE is NOT in CISA KEV, and no public exploit is referenced, so there is no evidence of active exploitation or weaponization. The practical risk is therefore gated almost entirely on the trust boundary around sweep configuration: in environments where Optuna sweep configs or CLI overrides are sourced from untrusted parties (CI pipelines, shared experiment platforms, multi-tenant ML infrastructure), this is effectively an arbitrary-code-execution primitive and a real priority to patch; in single-operator setups where the person supplying the config is the same person already authorized to run arbitrary Python, the real-world severity is much lower than the 7.8 implies. Note a signal conflict: the input Tags label this 'Authentication Bypass', but the description and CWE-470 make clear it is unsafe reflection / code execution (the 'bypass' is of an execution whitelist on 1.4 dev builds, not of authentication) - treat the tag as inaccurate. Also verify product identity: the description text matches the well-known Hydra configuration framework, but all references point to github.com/hydra-ecosystem/hydra, so confirm which distribution is affected before scoping.

Exploit ScenarioDerived

An attacker who can influence an Optuna sweep's configuration or command-line overrides sets hydra.sweeper.custom_search_space to a dotted path resolving to attacker-chosen importable Python code. When a user launches the sweep, the Hydra controller process calls hydra.utils.get_method() on that path and invokes the returned callable without the instantiate() execution policy, running arbitrary code with the application's privileges and, on affected 1.4 dev releases, bypassing the trusted-execution whitelist. No public proof-of-concept was identified at time of analysis, and the local vector plus required user interaction mean the attacker must get a victim to run the poisoned configuration.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 06, 2026

Configuration-controlled code execution in the hydra-optuna-sweeper package (Hydra 1.2.0 up to but not including 1.3.0, plus 1.4.0 development builds before 1.4.0.dev10) allows an attacker who controls Optuna sweep configuration or command-line overrides to name an arbitrary importable Python callable in hydra.sweeper.custom_search_space that Hydra resolves and then invokes inside the controller process at the application's privilege level, including bypassing the trusted execution whitelist introduced on affected 1.4.0 development releases. The assessed CVSS 3.1 vector is AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H (7.8 High): delivery is local and unauthenticated, but a victim must actually launch the sweep, after which confidentiality, integrity, and availability impact is total for the affected process. Exploitation is only meaningful where sweep configuration or overrides cross a trust boundary; no public exploit code and no confirmed active exploitation (CISA KEV) were identified at time of analysis.

RemediationAI

Upgrade hydra-optuna-sweeper and Hydra to 1.3.0 or 1.4.0.dev10 (or later; the upstream v1.3.7 release tag is also available) - these are the versions in which the flaw is fixed, and the change is carried by commits 0dd18084589a3d3e577d1f1a8a48fb485c94a5e6 and 4720dfca2bde27fa140ec287a05709668fbdf168, with details in advisory GHSA-5jjj-9xc3-rm56. Where upgrading is not immediately possible, stop using hydra.sweeper.custom_search_space in any deployment where sweep configuration or command-line overrides can originate outside the trusted operator boundary, since the vulnerability requires a configuration-controlled dotted path and a victim launching the sweep; treat Optuna sweep YAML files and override arguments as trusted artifacts only, and gate or review external/supplied configs before they reach the controller (trade-off: this removes the custom search space feature and therefore some tuning flexibility). Additional compensating measures with their trade-offs: run Hydra/Optuna sweeps under a least-privilege account or a container with a read-only filesystem and no network egress, which limits post-exploitation impact but does not prevent the callable from executing; restrict who can write sweep configuration files or supply Hydra overrides on the host, which reduces exposure but depends on host access controls rather than fixing the code path; and avoid relying on the 1.4.0 development execution whitelist as a control, since the advisory specifically notes it can be bypassed through this path on those pre-dev10 builds (and note that UNSAFE_DISABLE_EXECUTION_CHECKS explicitly turns such checks off, so it must never be set in exposed deployments).

Affected VersionsENISA

hydra 1.4.0.dev4, < 1.4.0.dev10
hydra 1.2.0, < 1.3.0

Affected Packages

pypi hydra-optuna-sweeper fix: 1.3.0, 1.4.0.dev10
euvd hydra_1_2_0 fix: 1.3.0
euvd hydra_1_4_0_dev4 fix: 1.4.0.dev10

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause is CWE-470 (Use of Externally-Controlled Input to Select Classes or Code, i.e. unsafe reflection). Hydra is a Python framework for composing hierarchical configuration, and the hydra-optuna-sweeper plugin integrates Optuna hyperparameter search into a Hydra application. When hydra.sweeper.custom_search_space is set to a dotted path, the sweeper resolves that path with hydra.utils.get_method() and later calls the resulting object in the Hydra controller process. get_method() is designed as a trusted-input lookup helper: unlike hydra.utils.instantiate(), it does not route the target through Hydra's execution policy (the module formerly named hydra/_internal/target_policy.py and renamed to hydra/_internal/execution_policy.py by the fix commit 0dd18084589a3d3e577d1f1a8a48fb485c94a5e6). The accompanying fix commit hardens that policy layer, converting the blacklist and callback-dispatch sets into frozensets, adding context-manager scaffolding, and documenting the threat model that declarative instantiation and logging configuration may be untrusted while installed Python code and execution whitelists supplied by trusted code are trusted. Because the lookup path skips those checks, on affected Hydra 1.4.0 development releases a configuration-supplied target could also circumvent the trusted execution whitelist that is supposed to constrain which callables may be invoked. The reachable surface is limited to deployments that install hydra-optuna-sweeper, enable the custom_search_space setting, and accept configuration or overrides from a source outside the operator's trust boundary.

Know when Hydra gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Config/override delivery is local (AV:L) and reliable (AC:L); Hydra's model treats declarative config as untrusted so no privileges are needed (PR:N), but a user must run the sweep (UI:R), yielding full code-execution impact (C/I/A:H).

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Red Hat 7.8 HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Oct 06, 2026 - 20:04 EUVD
CVE Published
Oct 06, 2026 - 18:51 cve.org
HIGH 7.8

DescriptionCVE.org

Hydra is a framework for elegantly configuring complex applications. From 1.2.0 until 1.3.0 and 1.4.0.dev10, the hydra-optuna-sweeper package accepts a configuration-controlled dotted path in hydra.sweeper.custom_search_space, resolves it with hydra.utils.get_method(), and later invokes the returned callable in the Hydra controller process. Because get_method() is a trusted-input lookup helper and does not apply the execution policy used by instantiate(), an attacker who controls Optuna sweep configuration or command-line overrides can select importable Python code for execution with the application's privileges, including bypassing a trusted execution whitelist on affected Hydra 1.4 development releases. This issue is fixed in versions 1.3.0 and 1.4.0.dev10.

Technical POC Analysis

Bug class: CWE-470, Use of Externally-Controlled Input to Select Classes or Code ("Unsafe Reflection").

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity flaw in hydra-optuna-sweeper affects Hydra 1.2.0 through 1.2.x and 1.4.0 development builds before 1.4.0.dev10, allowing a crafted sweep configuration or command-line override to execute arbitrary Python code inside the Hydra controller process at the launching user's privilege level. Machine learning and data science teams running automated hyperparameter sweeps are the primary exposure, and because exploitation is unauthenticated but requires the victim to launch the affected sweep, the practical risk concentrates where sweep configurations or overrides are accepted from sources outside the team's direct control. No vendor-released patch and no public exploit were identified at time of analysis.

Business Impact: High
Compensating Controls

Treat sweep configuration and command-line overrides as untrusted input and restrict who may supply them; run Hydra sweeps in least-privilege, network-restricted containers with no production credentials or secrets; pin to version ranges outside those affected (1.3.x, or 1.4.0.dev10 and later) where operationally feasible; monitor for unexpected resolution or invocation of callables in hydra.sweeper.custom_search_space; no vendor-released patch identified at time of analysis.

Threat Intelligence Overview

EPSS Score
0.3%
Top 82% exploitable
Prevalence
Medium
popular ML config framework, but optuna-sweeper plugin is a user subset
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

39
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Hydra

View all
CVE-2023-38701 CRITICAL POC
9.1 Oct 04

Hydra is the layer-two scalability solution for Cardano. Rated critical severity (CVSS 9.1), this vulnerability is remot

CVE-2023-42449 HIGH POC
8.1 Oct 04

Hydra is the two-layer scalability solution for Cardano. Rated high severity (CVSS 8.1), this vulnerability is remotely

CVE-2019-17502 HIGH POC
7.5 Oct 12

Hydra through 0.1.8 has a NULL pointer dereference and daemon crash when processing POST requests that lack a Content-Le

CVE-2019-8400 MEDIUM POC
6.1 Feb 17

ORY Hydra before v1.0.0-rc.3+oryOS.9 has Reflected XSS via the oauth2/fallbacks/error error_hint parameter. Rated medium

CVE-2026-106439 HIGH
8.5 Oct 06

Code execution with the hosting application's privileges is possible in Hydra 1.3.4 through versions before 1.3.7 (and b

CVE-2026-62162 HIGH
8.2 Oct 30

Pending deposits in Cardano Hydra heads can be stolen by any third party who can observe the chain and submit a standard

CVE-2023-42448 HIGH
8.1 Oct 04

Hydra is the layer-two scalability solution for Cardano. Rated high severity (CVSS 8.1), this vulnerability is remotely

CVE-2026-68508 HIGH
7.8 Aug 21

Arbitrary code execution in Facebook Research Hydra prior to version 1.3.4 allows any party who can supply untrusted con

CVE-2024-45049 HIGH
7.5 Aug 27

Hydra is a Continuous Integration service for Nix based projects. Rated high severity (CVSS 7.5), this vulnerability is

CVE-2023-42806 MEDIUM
6.5 Sep 21

Hydra is the layer-two scalability solution for Cardano. Rated medium severity (CVSS 6.5), this vulnerability is remotel

CVE-2024-32657 MEDIUM
5.4 Apr 22

Hydra is a Continuous Integration service for Nix based projects. Rated medium severity (CVSS 5.4), this vulnerability i

CVE-2020-5300 MEDIUM
5.3 Apr 06

In Hydra (an OAuth2 Server and OpenID Certified™ OpenID Connect Provider written in Go), before version 1.4.0+oryOS.17,

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy