VAITP Dataset

← Back to the dataset

CVE-2026-106439

Mutable module‑level policy allows attackers to bypass Hydra target blocklist.

  • CVSS 8.5
  • CWE-470
  • Design Defects
  • Local

Hydra is a framework for elegantly configuring complex applications. From 1.3.4 until 1.3.7 and 1.4.0.dev10, Hydra stores legacy instantiate target blocklists and related execution-policy collections in mutable module-level state. An attacker who controls multiple sibling target entries can resolve hydra._internal.target_policy.UNCONTROLLED_EXECUTION_TARGETS.discard through instantiate(), remove a denied target, and then invoke that target because sibling nodes are processed in insertion order against the same modified policy. The mutation persists in process-global state and can enable code execution with the application's privileges, while a narrow execution whitelist supplied by trusted Python code is not bypassed by the reported direct mutation path. This issue is fixed in versions 1.3.7 and 1.4.0.dev10.

CVSS base score
8.5
Published
2026-10-06
OWASP
A01 Broken Access Control
Orthogonal defect classification
Assignment
Code defect classification
Incorrect Assignment
Category
Design Defects
Subcategory
Poorly Designed Access Controls
Accessibility scope
Local
Impact
Arbitrary Code Execution
Affected component
Hydra
Fixed by upgrading
Yes

Solution

Upgrade Hydra to version 1.3.7 (or later, e.g., 1.4.0.dev10).

Vulnerable code sample

import hydra
from hydra import initialize, compose
from hydra._internal.target_policy import UNCONTROLLED_EXECUTION_TARGETS

def run_app():
    # VULNERABLE: mutates global blocklist via discard()
    UNCONTROLLED_EXECUTION_TARGETS.discard('dangerous.module.Danger')
    cfg = compose(config_name="app")
    obj = hydra.utils.instantiate(cfg.target)  # unsafe after blocklist mutation
    obj.execute()

Patched code sample

import hydra
from hydra import initialize, compose
from hydra._internal.target_policy import UNCONTROLLED_EXECUTION_TARGETS

def run_app():
    # FIX: operate on a copy to avoid mutating global blocklist
    safe_targets = UNCONTROLLED_EXECUTION_TARGETS.copy()
    safe_targets.discard('dangerous.module.Danger')
    cfg = compose(config_name="app")
    # use safe_targets locally; hydra.utils.instantiate respects the original immutable set
    obj = hydra.utils.instantiate(cfg.target)
    obj.execute()

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

  • Merge commit from fork (hydra-ecosystem/hydra)
    hydra/core/plugins.py, hydra/core/plugins.py · Plugins._instantiate, hydra/core/utils.py · run_job, hydra/main.py, hydra/utils.py, hydra/utils.py · get_class, hydra/utils.py · get_method, hydra/utils.py · get_object, hydra/_internal/execution_policy.py, hydra/_internal/execution_policy.py · _authorize_discovery_path, hydra/_internal/execution_policy.py · _authorize_discovery_result, hydra/_internal/execution_policy.py · _authorize_resolved_target_identity and 28 more
  • Merge commit from fork (hydra-ecosystem/hydra)
    hydra/core/plugins.py, hydra/core/plugins.py · Plugins._instantiate, hydra/utils.py · get_class, hydra/utils.py · get_method, hydra/utils.py · get_object, hydra/_internal/instantiate/_instantiate2.py, hydra/_internal/instantiate/_instantiate2.py · instantiate, hydra/_internal/instantiate/_instantiate2.py · _call_target, hydra/_internal/logging_config.py, hydra/_internal/logging_config.py · HydraDictConfigurator.configure_formatter, hydra/_internal/logging_config.py · HydraDictConfigurator.configure_handler, hydra/_internal/logging_config.py · HydraDictConfigurator.resolve and 13 more

Cite this entry

@misc{vaitp:cve2026106439,
  title        = {{Mutable module‑level policy allows attackers to bypass Hydra target blocklist.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-106439},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-106439/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.