Skip to content
Heist/ feed
Back to feed
HighFix available

Hydra: Optuna custom_search_space can resolve and execute untrusted callables via get_method

Type: advisorySources: OSV

## 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 configuratio

Products
hydra-optuna-sweeper
Affected versions
1.2.0, 1.3.0.dev0, 1.4.0.dev4, 1.4.0.dev5, 1.4.0.dev6, 1.4.0.dev7, 1.4.0.dev8, 1.4.0.dev9
Fixed versions
1.3.0, 1.4.0.dev10
CVEs
CVE-2026-106440
Confirmed fixed CVEs
Not specified
Updated in this feed
30 Oct 2026, 18:15 UTC · Revision 1

Source evidence

Hydra: Optuna custom_search_space can resolve and execute untrusted callables via get_method

core-osv · Original source

Published 7 Oct 2026, 20:24 UTC

## 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 configuratio

osv:GHSA-5jjj-9xc3-rm56

hydra-optuna-sweeper

Fixed versions: 1.3.0

hydra-optuna-sweeper

Fixed versions: 1.4.0.dev10

Complete source record
{
  "id": "82bff64301289a4a615c7b08a21cfddecc13c053588a33451ba929f26648238d",
  "url": "https://osv.dev/vulnerability/GHSA-5jjj-9xc3-rm56",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Hydra: Optuna custom_search_space can resolve and execute untrusted callables via get_method",
    "summary": "## 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 configuratio",
    "evidence": "osv:GHSA-5jjj-9xc3-rm56",
    "products": [
      {
        "name": {
          "value": "hydra-optuna-sweeper",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.3.0",
            "evidence": "/affected/0/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.2.0",
            "evidence": "/affected/0/versions"
          },
          {
            "value": "1.3.0.dev0",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "hydra-optuna-sweeper",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "1.4.0.dev10",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": [
          {
            "value": "1.4.0.dev4",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.4.0.dev5",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.4.0.dev6",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.4.0.dev7",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.4.0.dev8",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "1.4.0.dev9",
            "evidence": "/affected/1/versions"
          }
        ]
      }
    ],
    "severity": "high",
    "structured": {
      "id": "GHSA-5jjj-9xc3-rm56",
      "aliases": [
        "CVE-2026-106440",
        "GHSA-5jjj-9xc3-rm56",
        "PYSEC-2026-4224"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "1.2.0"
                },
                {
                  "fixed": "1.3.0"
                }
              ]
            }
          ],
          "package": {
            "name": "hydra-optuna-sweeper",
            "purl": "pkg:pypi/hydra-optuna-sweeper",
            "ecosystem": "PyPI"
          },
          "versions": [
            "1.2.0",
            "1.3.0.dev0"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-5jjj-9xc3-rm56/GHSA-5jjj-9xc3-rm56.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "1.4.0.dev4"
                },
                {
                  "fixed": "1.4.0.dev10"
                }
              ]
            }
          ],
          "package": {
            "name": "hydra-optuna-sweeper",
            "purl": "pkg:pypi/hydra-optuna-sweeper",
            "ecosystem": "PyPI"
          },
          "versions": [
            "1.4.0.dev4",
            "1.4.0.dev5",
            "1.4.0.dev6",
            "1.4.0.dev7",
            "1.4.0.dev8",
            "1.4.0.dev9"
          ],
          "database_specific": {
            "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-5jjj-9xc3-rm56/GHSA-5jjj-9xc3-rm56.json"
          }
        }
      ],
      "modified": "2026-10-15T14:55:49.075978668Z",
      "provider": "osv",
      "references": [
        "https://github.com/hydra-ecosystem/hydra/security/advisories/GHSA-5jjj-9xc3-rm56",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-106440",
        "https://github.com/hydra-ecosystem/hydra/commit/0dd18084589a3d3e577d1f1a8a48fb485c94a5e6",
        "https://github.com/hydra-ecosystem/hydra/commit/4720dfca2bde27fa140ec287a05709668fbdf168",
        "https://github.com/hydra-ecosystem/hydra",
        "https://github.com/hydra-ecosystem/hydra/releases/tag/v1.3.7"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-470"
        ],
        "severity": "HIGH",
        "github_reviewed": true,
        "nvd_published_at": "2026-10-06T19:18:12Z",
        "github_reviewed_at": "2026-10-07T20:24:02Z"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-106440",
        "evidence": "/aliases"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/database_specific/severity"
  },
  "source_id": "core-osv",
  "document_id": 332681,
  "published_at": "2026-10-07T20:24:02+00:00"
}