The vulnerability CVE-2025-22236 describes a minion event bus authorization bypass in Salt. An attacker with access to a minion key can craft a message to execute jobs on other minions. The provided commit 41d834bf800d86fc496e4fac2d3875fc2aca7c62 directly addresses this by implementing event tag filtering.
The core of the vulnerability lies in the _minion_event function within salt/daemons/masterapi.py. This function is responsible for handling events sent from minions to the master. Prior to the patch, this function would process events without sufficiently validating the event tags. Certain event tags are intended for internal use by the master or for specific privileged operations. By allowing a minion to send events with these tags, an attacker could bypass authorization checks and trigger actions on other minions or the master itself.
The patch introduces a blacklist of event tags (MINION_EVENT_BLACKLIST) and a new function valid_minion_tag to check if an incoming event's tag is on this blacklist. The _minion_event function is modified to call valid_minion_tag and discard events with blacklisted tags. This change prevents minions from injecting events that could lead to unauthorized command execution. Therefore, salt.daemons.masterapi._minion_event is identified as the vulnerable function because it was the entry point for processing these potentially malicious, unvalidated events.