The vulnerability allows an authorized minion to inject arbitrary events onto the Salt Master's event bus. The provided commit 41d834bf800d86fc496e4fac2d3875fc2aca7c62 directly addresses this issue by modifying the _minion_event method within the salt/daemons/masterapi.py file.
The patch introduces a new function valid_minion_tag which is used to check the event["tag"] within _minion_event before the event is fired using self.event.fire_event(event_data, event["tag"]). The addition of this check clearly indicates that _minion_event was the point where the unfiltered, potentially malicious, event tags were processed. Therefore, salt.daemons.masterapi.ClearFuncs._minion_event is identified as the vulnerable function. The vulnerability lies in the lack of input validation for the event tag before this patch.
The root cause is improper authorization/validation of event tags submitted by minions, allowing them to publish events with tags that should be restricted, potentially leading to unintended actions or information disclosure on the master.