All vulnerabilities
CVE-2026-106440GHSA-5jjj-9xc3-rm56PYSEC-2026-4224

hydra-optuna-sweeper: Hydra: Optuna custom_search_space can resolve and execute untrusted callables via get_method

hydra-ecosystem hydra-optuna-sweeperpipLibraries & packages
CVSS
7.8High
ExploitationNo known exploitationNot in CISA KEV, which does not prove it is unexploitedCISA KEV
Exploit odds (EPSS)0.27%Chance of exploitation activity in the next 30 days, higher than 18% of CVEs. Scored 23 Oct 2026FIRST EPSS
Fixed in1.3.0Also 1.4.0.dev10GitHub
Published6 Oct 2026Updated 15 Oct 2026CVE List

What fixes it

  • 1.3.0hydra-optuna-sweeper, pipGitHub
  • 1.4.0.dev10hydra-optuna-sweeper, pipGitHub
  • 1.3.0hydra-optuna-sweeper, PyPIOSVpip install "hydra-optuna-sweeper>=1.3.0"
  • 1.4.0.dev10hydra-optuna-sweeper, PyPIOSVpip install "hydra-optuna-sweeper>=1.4.0.dev10"

A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.

Description

Summary

hydra-optuna-sweeper accepted a configuration-controlled dotted path in hydra.sweeper.custom_search_space, resolved it with the lower-level hydra.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.

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.

Fix

The Optuna sweeper now resolves the configured callback through hydra.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(), and get_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().

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).

Text from GitHub Advisory Database

Affected versions 14

  • hydra-optuna-sweeper, pip>= 1.2.0, < 1.3.0GitHub
  • hydra-optuna-sweeper, pip>= 1.4.0.dev4, < 1.4.0.dev10GitHub
  • hydraaffected: >= 1.2.0, < 1.3.0CVE List
  • hydraaffected: >= 1.4.0.dev4, < 1.4.0.dev10CVE List
  • hydra-optuna-sweeper, PyPIfrom 1.2.0, fixed in 1.3.0OSV
  • hydra-optuna-sweeper, PyPI1.2.0OSV
  • hydra-optuna-sweeper, PyPI1.3.0.dev0OSV
  • hydra-optuna-sweeper, PyPIfrom 1.4.0.dev4, fixed in 1.4.0.dev10OSV
  • hydra-optuna-sweeper, PyPI1.4.0.dev4OSV
  • hydra-optuna-sweeper, PyPI1.4.0.dev5OSV
  • hydra-optuna-sweeper, PyPI1.4.0.dev6OSV
  • hydra-optuna-sweeper, PyPI1.4.0.dev7OSV
  • hydra-optuna-sweeper, PyPI1.4.0.dev8OSV
  • hydra-optuna-sweeper, PyPI1.4.0.dev9OSV

References 6