# GHSA-wf6j-7hvr-gr93: Hydra legacy target blacklist permits unsafe PyYAML loading


- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 27 Oct 2026

## What is GHSA-wf6j-7hvr-gr93?

GHSA-wf6j-7hvr-gr93 is a vulnerability in hydra-core, published on 27 Oct 2026. 

### Official description

## Summary

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.

## Impact and prerequisites

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. This model-loading
attack pattern is documented in the original Hydra advisory
GHSA-2cp2-2r3c-7p7r and the associated Unit 42 research. It does not imply that
all Hugging Face models or currently patched downstream loaders are affected.

Hydra 1.3's blacklist is defense in depth, not a complete security boundary.
Hydra 1.4 is affected on its deprecated no-whitelist legacy path. Installed
application wrappers can perform indirect operations beyond a name-based
blacklist's coverage; this fix does not make arbitrary configuration safe.

The unsafe_load finding is directly reproduced. PyYAML 6.0.3 full_load rejects
the demonstrated python/object/apply payload, so the finding does not claim that
all PyYAML loading APIs execute that payload.

## Remediation

The fix blocks the yaml. target namespace except for the exact yaml.safe_load,
yaml.safe_load_all, yaml.safe_dump, and yaml.safe_dump_all functions. Loader
classes, constructor registration, general dump/load APIs, and other targets in
the namespace remain blocked. Existing canonical-identity checks also cover
aliases. The fix preserves Hydra 1.4's explicit unsafe opt-out for trusted use.

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

## Affected releases

The reported incomplete-remediation stable range is hydra-core 1.3.6 through
1.3.7. The 1.4 prerelease legacy path is also affected, including 1.4.0.dev9,
1.4.0.dev10, 1.4.0rc1, and 1.4.0rc2. The related blacklist advisory
GHSA-rqx7-p7vv-w7hr was first patched in 1.3.6 and 1.4.0.dev9; these ranges
describe the remaining omission after that remediation.

## Credit

Reported by zx (@manus-pi).

## Which versions are affected by GHSA-wf6j-7hvr-gr93?

4 open source packages ship an affected version, including hydra-core.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `hydra-core` | PyPI | From 1.3.6 | 1.3.8 |
| `hydra-core` | PyPI | From 1.3.6 | 1.3.8 |
| `hydra-core` | PyPI | From 1.4.0.dev9 | 1.4.0rc3 |
| `hydra-core` | PyPI | From 1.4.0.dev9 | 1.4.0rc3 |

## How do I fix GHSA-wf6j-7hvr-gr93?

Upgrade hydra-core to a fixed version for your release line: 1.3.8 or 1.4.0rc3.

## Is GHSA-wf6j-7hvr-gr93 being exploited?

There is no known exploitation of GHSA-wf6j-7hvr-gr93 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-wf6j-7hvr-gr93 and fix it if it is affected.

What it is: GHSA-wf6j-7hvr-gr93 is a vulnerability in hydra-core, published on 27 Oct 2026. 
Exploitation: There is no known exploitation of GHSA-wf6j-7hvr-gr93 in the wild and no public exploit code.

Affected packages and fixed versions:
- hydra-core (PyPI): affected from 1.3.6; fixed in 1.3.8
- hydra-core (PyPI): affected from 1.3.6; fixed in 1.3.8
- hydra-core (PyPI): affected from 1.4.0.dev9; fixed in 1.4.0rc3
- hydra-core (PyPI): affected from 1.4.0.dev9; fixed in 1.4.0rc3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-wf6j-7hvr-gr93/ (Markdown: https://insights.sbomify.com/GHSA-wf6j-7hvr-gr93/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-wf6j-7hvr-gr93

---
From sbomify Insights: https://insights.sbomify.com/GHSA-wf6j-7hvr-gr93/
Summaries are generated and may contain mistakes; the official description above is the record.
