{"id":"GHSA-wf6j-7hvr-gr93","kind":"vulnerability","aliases":["GHSA-wf6j-7hvr-gr93"],"related":[],"title":"Hydra legacy target blacklist permits unsafe PyYAML loading","description":"## Summary\n\nHydra's legacy target blacklist omits PyYAML's unsafe loading surfaces. If an\napplication passes attacker-controlled targets and arguments to instantiate(),\na target such as yaml.unsafe_load can execute Python code through a\nconfig-controlled YAML stream containing Python object-construction tags.\n\n## Impact and prerequisites\n\nThe attacker must control the relevant target and arguments that the application\ninstantiates. The configured callable executes with the application's process\nprivileges. This is a gap in the best-effort legacy blacklist. It is not a bypass\nof Hydra 1.4's execution whitelist supplied by trusted Python code.\n\nOne realistic exposure is a model downloaded from a third-party repository,\nsuch as Hugging Face, that bundles attacker-controlled configuration. When a\nvictim loads the model using application code that passes this configuration\nto legacy Hydra instantiation without effective target restrictions, the\nmodel's metadata can execute code in the victim process. This model-loading\nattack pattern is documented in the original Hydra advisory\nGHSA-2cp2-2r3c-7p7r and the associated Unit 42 research. It does not imply that\nall Hugging Face models or currently patched downstream loaders are affected.\n\nHydra 1.3's blacklist is defense in depth, not a complete security boundary.\nHydra 1.4 is affected on its deprecated no-whitelist legacy path. Installed\napplication wrappers can perform indirect operations beyond a name-based\nblacklist's coverage; this fix does not make arbitrary configuration safe.\n\nThe unsafe_load finding is directly reproduced. PyYAML 6.0.3 full_load rejects\nthe demonstrated python/object/apply payload, so the finding does not claim that\nall PyYAML loading APIs execute that payload.\n\n## Remediation\n\nThe fix blocks the yaml. target namespace except for the exact yaml.safe_load,\nyaml.safe_load_all, yaml.safe_dump, and yaml.safe_dump_all functions. Loader\nclasses, constructor registration, general dump/load APIs, and other targets in\nthe namespace remain blocked. Existing canonical-identity checks also cover\naliases. The fix preserves Hydra 1.4's explicit unsafe opt-out for trusted use.\n\n## Workarounds\n\nDo not pass untrusted configuration to instantiate() or call(). For Hydra 1.4,\nsupply a narrow execution whitelist from trusted Python code. Do not let\nuntrusted configuration select its own execution policy or opt out of checks.\n\n## Affected releases\n\nThe reported incomplete-remediation stable range is hydra-core 1.3.6 through\n1.3.7. The 1.4 prerelease legacy path is also affected, including 1.4.0.dev9,\n1.4.0.dev10, 1.4.0rc1, and 1.4.0rc2. The related blacklist advisory\nGHSA-rqx7-p7vv-w7hr was first patched in 1.3.6 and 1.4.0.dev9; these ranges\ndescribe the remaining omission after that remediation.\n\n## Credit\n\nReported by zx (@manus-pi).","summary":"Hydra's legacy instantiate() blacklist omits PyYAML's unsafe loading functions, so a config-controlled target such as yaml.unsafe_load can run Python code when an application passes untrusted targets and arguments into it. The configured callable runs with the application's process privileges, and the same pattern can arise from a third-party model whose bundled configuration is loaded by the app.","severity":"high","cvss":7.8,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"hydra-core","fixed":["1.3.8"],"affected":">= 1.3.6, < 1.3.8","ecosystem":"pypi"},{"name":"hydra-core","fixed":["1.4.0rc3"],"affected":">= 1.4.0.dev9, < 1.4.0rc3","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["cwe-184","hydra-core","ml-pipelines","package","python","pyyaml"],"not_affected_if":["default-config","trusted-config-only"],"how_to_check":"- Run `pip show hydra-core` and check whether the version is `1.3.6` or `1.3.7`, or a 1.4 prerelease `1.4.0.dev9`, `1.4.0.dev10`, `1.4.0rc1` or `1.4.0rc2`.\n- Search application code for calls to `instantiate(` or `call(` from hydra and check whether any config passed to them comes from users, uploads or downloaded model metadata.","fix":"- Upgrade hydra-core to `1.3.8` on the 1.3 line.\n- Upgrade hydra-core to `1.4.0rc3` on the 1.4 line.\n- Until upgraded, do not pass untrusted configuration to `instantiate()` or `call()`; for Hydra 1.4, supply a narrow execution whitelist from trusted Python code.","status":"open","published_at":"2026-10-27T17:08:41+00:00","first_seen_at":"2026-10-27T17:11:59+00:00","triaged_at":"2026-10-27T17:13:15+00:00","updated_at":"2026-10-27T17:13:15+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-10-27T17:13:15Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade hydra-core to `1.3.8` on the 1.3 line.\n- Upgrade hydra-core to `1.4.0rc3` on the 1.4 line.\n- Until upgraded, do not pass untrusted configuration to `instantiate()` or `call()`; for Hydra 1.4, supply a narrow execution whitelist from trusted Python code.","reach":"unknown","title":"Hydra: legacy target blacklist lets config run PyYAML unsafe loading","impact":"high","summary":"Hydra's legacy instantiate() blacklist omits PyYAML's unsafe loading functions, so a config-controlled target such as yaml.unsafe_load can run Python code when an application passes untrusted targets and arguments into it. The configured callable runs with the application's process privileges, and the same pattern can arise from a third-party model whose bundled configuration is loaded by the app.","category":"package","nicknames":[],"who_cares":["python","hydra-core","pyyaml","ml-pipelines"],"confidence":0.8,"needs_auth":"unknown","worst_case":"Attacker code runs in the application process with its privileges","analyst_note":"Confirm whether the fixed versions 1.3.8 and 1.4.0rc3 are on PyPI and check the original advisory GHSA-2cp2-2r3c-7p7r for model-loader guidance.","how_to_check":"- Run `pip show hydra-core` and check whether the version is `1.3.6` or `1.3.7`, or a 1.4 prerelease `1.4.0.dev9`, `1.4.0.dev10`, `1.4.0rc1` or `1.4.0rc2`.\n- Search application code for calls to `instantiate(` or `call(` from hydra and check whether any config passed to them comes from users, uploads or downloaded model metadata.","needs_analyst":true,"not_affected_if":["trusted-config-only","default-config"],"who_is_affected":"Applications that pass attacker-controlled targets or arguments into Hydra's legacy instantiate() or call(), including loaders that read configuration bundled with a third-party model. Projects that only use Hydra with their own trusted configuration files, or that already use Hydra 1.4's execution whitelist, are less exposed; the sources do not say how common the model-loading pattern is in real loaders.","user_interaction":"unknown","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000852,"input_tokens":4356,"output_tokens":833,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-184':26B '1.3':297C '1.3.6':485C,519C '1.3.7':487C '1.4':192C,310C,425C,447C,489C '1.4.0':497C,499C,501C,504C,521C '2cp2':271C '2r3c':272C '42':278C '6.0.3':352C '7hvr':12A,17A '7p7r':273C 'advisori':268C,509C 'affect':295C,312C,472C,495C 'alias':420C 'also':418C,494C 'api':370C,404C 'app':100B 'applic':63B,77B,115C,162C,170C,231C,322C 'arbitrari':341C 'argument':68B,122C,159C 'aris':86B 'associ':276C 'attack':118C,152C,221C,260C 'attacker-control':117C,220C 'base':332C 'best':181C 'best-effort':180C 'beyond':328C 'blacklist':4A,40B,106C,184C,299C,333C,508C 'block':377C,412C 'boundari':308C 'bundl':94B,219C 'bypass':189C 'call':444C 'callabl':73B,166C 'canon':415C 'canonical-ident':414C 'check':417C,471C 'claim':365C 'class':399C 'code':60B,134C,200C,232C,251C,456C 'complet':306C 'config':50B,138C 'config-control':49B,137C 'configur':72B,95B,165C,223C,236C,342C,440C,461C 'construct':146C 'constructor':400C 'contain':142C 'control':51B,119C,139C,154C,222C 'core':21A,24A,29B,484C 'cover':419C 'coverag':335C 'credit':532C 'current':290C 'cwe':25B 'defens':301C 'demonstr':357C 'deprec':315C 'depth':303C 'describ':525C 'dev10':500C 'dev9':498C,522C 'direct':349C 'document':263C 'download':207C 'downstream':292C 'dump':392C,395C 'dump/load':403C 'effect':242C 'effort':182C 'exact':385C 'except':382C 'execut':132C,167C,194C,250C,371C,451C,465C 'exist':413C 'explicit':427C 'exposur':203C 'face':217C,287C 'find':347C,362C 'first':516C 'fix':337C,376C,422C 'full':353C 'function':46B,397C 'gap':177C 'general':402C 'ghsa':10A,15A,270C,511C 'ghsa-2cp2-2r3c-7p7r':269C 'ghsa-rqx7-p7vv-w7hr':510C 'ghsa-wf6j-7hvr-gr93':9A,14A 'gr93':13A,18A 'hug':216C,286C 'hydra':1A,20A,23A,28B,36B,102C,191C,239C,267C,296C,309C,424C,446C,483C 'hydra-cor':27B,482C 'hydra-core':19A,22A 'ident':416C 'impact':148C 'impli':283C 'includ':496C 'incomplet':477C 'incomplete-remedi':476C 'indirect':326C 'instal':321C 'instanti':39B,124C,163C,240C,442C 'legaci':2A,38B,104C,183C,238C,319C,491C 'let':459C 'load':8A,45B,56B,97B,111C,130C,227C,259C,346C,354C,369C,387C,389C 'loader':293C,398C 'make':340C 'manus':537C 'manus-pi':536C 'metadata':248C 'ml':31B 'ml-pipelin':30B 'model':92B,206C,229C,246C,258C,288C 'model-load':257C 'must':153C 'name':331C 'name-bas':330C 'namespac':381C,410C 'narrow':450C 'no-whitelist':316C 'object':145C 'object-construct':144C 'omiss':528C 'omit':41B,107C 'one':201C 'oper':327C 'opt':430C,468C 'opt-out':429C 'origin':266C 'p7vv':513C 'packag':33B 'parti':91B,212C 'pass':64B,116C,234C,438C 'patch':291C,517C 'path':320C,492C 'pattern':84B,261C 'payload':359C,373C 'perform':325C 'permit':5A 'pi':538C 'pipelin':32B 'polici':466C 'prereleas':490C 'prerequisit':150C 'preserv':423C 'privileg':80B,173C 'process':79B,172C,255C 'python':34B,59B,133C,143C,199C,455C 'python/object/apply':358C 'pyyaml':7A,35B,42B,108C,351C,368C 'rang':480C,524C 'rc1':502C 'rc2':505C 'realist':202C 'registr':401C 'reject':355C 'relat':507C 'releas':473C 'relev':156C 'remain':411C,527C 'remedi':374C,478C,531C 'report':475C,533C 'repositori':213C 'reproduc':350C 'research':279C 'restrict':244C 'rqx7':512C 'run':58B,74B 'safe':343C 'secur':307C 'select':462C 'stabl':479C 'stream':141C 'summari':101C 'suppli':196C,448C 'surfac':112C 'tag':147C 'target':3A,52B,66B,105C,120C,126C,157C,243C,380C,407C 'third':90B,211C 'third-parti':89B,210C 'trust':198C,433C,454C 'unit':277C 'unsaf':6A,44B,110C,345C,428C 'untrust':65B,439C,460C 'use':230C,434C 'victim':226C,254C 'w7hr':514C 'wf6j':11A,16A 'whitelist':195C,318C,452C 'whose':93B 'without':241C 'workaround':435C 'wrapper':323C 'yaml':140C,379C 'yaml.safe':386C,388C,391C,394C 'yaml.unsafe':55B,129C 'zx':535C","nicknames":[],"mitigations":[],"who_affected":"Applications that pass attacker-controlled targets or arguments into Hydra's legacy instantiate() or call(), including loaders that read configuration bundled with a third-party model. Projects that only use Hydra with their own trusted configuration files, or that already use Hydra 1.4's execution whitelist, are less exposed; the sources do not say how common the model-loading pattern is in real loaders.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-27T17:08:41+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-wf6j-7hvr-gr93","url":"https://github.com/advisories/GHSA-wf6j-7hvr-gr93","severity":"high","published_at":"2026-10-27T17:08:41+00:00","modified_at":"2026-10-27T17:08:42+00:00","first_seen_at":"2026-10-27T17:11:59+00:00","fetched_at":"2026-10-27T17:22:22+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}