GHSA-5jjj-9xc3-rm56: High severity pip/hydra-optuna-sweeper vulnerability

Published Oct 7, 2026
·
Updated

Summary

hydra-optuna-sweeper accepted a configuration-controlled dotted path in hydra.sweeper.customsearchspace, resolved it with the lower-level hydra.utils.getmethod() 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 getobject(), getmethod(), getstaticmethod(), and getclass() 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 customsearchspace from externally controlled input or allow untrusted users to place modules on the application import path.

Reported by zx (GitHub: @manus-pi).

Affected Software

2 affected componentsFixes available
pip/hydra-optuna-sweeper>=1.4.0.dev4<1.4.0.dev10
1.4.0.dev10
pip/hydra-optuna-sweeper>=1.2.0<1.3.0
1.3.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/hydra-optuna-sweeper to a version that resolves this vulnerability.

    Fixed in 1.4.0.dev10
  2. Upgrade

    Upgrade pip/hydra-optuna-sweeper to a version that resolves this vulnerability.

    Fixed in 1.3.0
  3. Upgrade

    Upgrade hydra-optuna-sweeper to a version that resolves this vulnerability.

    Fixed in 1.3.0
  4. Upgrade

    Upgrade hydra-optuna-sweeper to a version that resolves this vulnerability.

    Fixed in 1.4.0.dev10
  5. Compensating control

    Treat Optuna sweep configuration and command-line overrides as trusted; do not allow untrusted users to set custom_search_space or place modules on the application import path.

Event History

Oct 7, 2026
Advisory Published
via GitHub·08:24 PM
Data Sourced
via GitHub·08:24 PM
DescriptionSeverityWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203