The vulnerability lies in several React components within the Mattermost web application. Specifically, useEffect hooks in the UserProfile, Member, and UserDetails components were incorrectly configured. These hooks were designed to fetch information about remote users. However, their dependency arrays included state variables that were modified as a result of the API calls made within the hooks themselves.
When an API request triggered by the useEffect failed, the error handling logic would update the component's state. This state update would then cause the component to re-render. Because the modified state variable was also in the useEffect's dependency array, the hook would be triggered again, initiating another API call. This sequence created an infinite loop of API calls and re-renders, consuming excessive client-side resources and leading to a Denial of Service (DoS) that would freeze the user's browser tab.
The patches address this issue by removing the problematic state variables from the dependency arrays of the useEffect hooks. This ensures that an API error does not re-trigger the hook, thus breaking the infinite loop.