Summary
Hydra: Optuna customsearchspace can resolve and execute untrusted callables via get_method
hydra-optuna-sweeper accepted a configuration-controlled dotted path inhydra.sweeper.custom_search_space, resolved it with the lower-levelhydra.utils.get_method() API, and later invoked the returned callable.
Hydra's object-lookup helpers intentionally trust their input and do not apply
the execution policy used by instantiate() and logging configuration. As a
result, untrusted Optuna multirun configuration could select installed Python
code for execution in the Hydra controller process.
Affected versions
- Package:
hydra-optuna-sweeper - Stable affected range:
>= 1.2.0, < 1.3.0 - Stable fixed version:
1.3.0 - Development affected range:
>= 1.4.0.dev4, < 1.4.0.dev10 - Development fixed version:
1.4.0.dev10
The feature was introduced in 1.2.0 and is absent from the 1.1 release line.
The 1.4 development line was affected from 1.4.0.dev4 through 1.4.0.dev9.
Workaround
Treat Optuna sweep configuration and command-line overrides as trusted. Do not
set custom_search_space from externally controlled input or allow untrusted
users to place modules on the application import path.
Reported by zx (GitHub: @manus-pi).
Impact
Exploitation requires control of an application's Optuna sweep configuration
or command-line overrides and an importable callable in the application's
environment. Selected code runs with the privileges of the application.
On affected Hydra 1.4 development releases, this path bypasses an execution
whitelist provided by trusted application code. Hydra 1.3 has no execution-whitelist
security boundary; there, the same change restores the legacy blocklist as
defense in depth.
CVE-2026-106440 has a CVSS score of 7.8 (High). The vector is requires local access, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.3.0, 1.4.0.dev10); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The Optuna sweeper now resolves the configured callback throughhydra.utils.instantiate() as a partial callable. On Hydra 1.4, the active
execution whitelist therefore authorizes the callback before use. On Hydra
1.3, the legacy blocklist is applied as defense in depth.
The public get_object(), get_method(), get_static_method(), andget_class() helpers remain lower-level trusted-input APIs. Their documentation
now warns against passing values derived from untrusted configuration and
directs config-driven construction to instantiate().
Frequently Asked Questions
- What is CVE-2026-106440? CVE-2026-106440 is a high-severity security vulnerability in hydra-optuna-sweeper (pip), affecting versions >= 1.2.0, < 1.3.0. It is fixed in 1.3.0, 1.4.0.dev10.
- How severe is CVE-2026-106440? CVE-2026-106440 has a CVSS score of 7.8 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of hydra-optuna-sweeper are affected by CVE-2026-106440? hydra-optuna-sweeper (pip) versions >= 1.2.0, < 1.3.0 is affected.
- Is there a fix for CVE-2026-106440? Yes. CVE-2026-106440 is fixed in 1.3.0, 1.4.0.dev10. Upgrade to this version or later.
- Is CVE-2026-106440 exploitable, and should I be worried? Whether CVE-2026-106440 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-106440 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-106440?
- Upgrade
hydra-optuna-sweeperto 1.3.0 or later - Upgrade
hydra-optuna-sweeperto 1.4.0.dev10 or later
- Upgrade