| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/mattermost/mattermost/server/v8 | go | >= 8.0.0-20250721062209-4952acea88ce, < 8.0.0-20251016131338-dad6bd7a1509 | 8.0.0-20251016131338-dad6bd7a1509 |
| github.com/mattermost/mattermost | go | >= 10.11.0-rc1, < 10.11.5-0.20251016131338-dad6bd7a1509 | 10.11.5-0.20251016131338-dad6bd7a1509 |
| github.com/mattermost/mattermost | go | >= 11.0.0-alpha.1, < 11.1.0 | 11.1.0 |
The vulnerability is an open redirect on the error page of Mattermost. The analysis of the provided commit dad6bd7a1509054580a0898bbc0e026aac3b30cb shows a change in the ErrorPage component in webapp/channels/src/components/error_page/error_page.tsx. The patch reveals that the returnTo query parameter was being used directly to construct a redirect link. The vulnerable code, <Link to={params.get('returnTo') as string}>, reads the parameter from the URL and uses it as the target of a Link. This allows an attacker to specify an external, malicious URL in the returnTo parameter. The fix replaces this with <Link to={returnTo}>, where returnTo is a validated variable. Therefore, the ErrorPage component, specifically its rendering logic, is the vulnerable function.
ErrorPagewebapp/channels/src/components/error_page/error_page.tsx