The vulnerability exists in the ValidateArgumentType function within service/internal/api/api.go. The function, prior to the patch, did not perform any authentication or authorization checks. This allowed an unauthenticated attacker to call this endpoint and, by observing the responses, enumerate valid action binding IDs and their corresponding argument configurations. This is especially problematic when the AuthRequireGuestsToLogin setting is enabled, as it's intended to restrict access to guests.
The patch addresses this by adding authentication and authorization checks at the beginning of the ValidateArgumentType function, specifically by calling auth.UserFromApiCall and api.checkDashboardAccess. Additionally, a new function, validateArgumentTypeBindingAccess, was introduced to verify that the user has the necessary permissions to view the action associated with the binding ID. These changes ensure that only authenticated and authorized users can use the ValidateArgumentType endpoint, thus mitigating the information disclosure vulnerability.