The vulnerability exists in the RestartAction function, which is responsible for re-executing a previously run action. The core of the issue lies in how RestartAction constructs a new request to call the StartAction function. In the vulnerable version, it creates a new connect.Request object but fails to carry over the authentication details from the original user's request. When StartAction receives this new, unauthenticated request, its authentication logic (auth.UserFromApiCall) defaults to using the 'guest' user. If the guest user has been configured with permissions that the original, authenticated user lacks (e.g., permission to execute shell commands), this results in a privilege escalation. A low-privilege user can therefore exploit this to execute actions they are not authorized to run. The fixing patch confirms this by removing the call to StartAction and instead, correctly retrieving the authenticated user from the original request context and directly preparing and executing the action with the correct user's permissions.