All vulnerabilities

PyPI

GHSA-wf6j-7hvr-gr93

Hydra legacy target blacklist permits unsafe PyYAML loading

Severity
High 7.8
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
1.3.8, 1.4.0rc3
Weakness
Incomplete deny list (CWE-184)
Attack
Needs local access · No login needed · Needs someone to click or open something
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Sources
OSV.dev and GitHub

Description

Hydra's legacy target blacklist omits PyYAML's unsafe loading surfaces. If an application passes attacker-controlled targets and arguments to instantiate(), a target such as yaml.unsafe_load can execute Python code through a config-controlled YAML stream containing Python object-construction tags.

The attacker must control the relevant target and arguments that the application instantiates. The configured callable executes with the application's process privileges. This is a gap in the best-effort legacy blacklist. It is not a bypass of Hydra 1.4's execution whitelist supplied by trusted Python code.

One realistic exposure is a model downloaded from a third-party repository, such as Hugging Face, that bundles attacker-controlled configuration. When a victim loads the model using application code that passes this configuration to legacy Hydra instantiation without effective target restrictions, the model's metadata can execute code in the victim process.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

Do not pass untrusted configuration to instantiate() or call(). For Hydra 1.4, supply a narrow execution whitelist from trusted Python code. Do not let untrusted configuration select its own execution policy or opt out of checks.

Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
hydra-corePyPI · osv:PyPI:hydra-core
  • From 1.3.6 before 1.3.8
  • From 1.4.0.dev9 before 1.4.0rc3

About hydra-core

Weekly downloads (PyPI)
4,552,565PyPI Stats, 24 Nov 2026

This is the only vulnerability in hydra-core in our list.

References