| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/oauth2-proxy/oauth2-proxy/v7 | go | < 7.1.0 | 7.1.0 |
The vulnerability lies in the gitlab provider of oauth2-proxy. The core issue is that the logic for checking a user's group membership was flawed. Instead of checking the user's actual groups from GitLab, the system was checking against the list of groups provided in the --gitlab-group configuration flag. This was caused by the addGroupsToSession function, which populated the user's session with the configured groups rather than the user's groups.
The EnrichSession function was responsible for preparing the user's session and called the vulnerable addGroupsToSession function. The patch fixed the issue by removing addGroupsToSession entirely and changing EnrichSession to correctly populate the user's groups from the userInfo object returned by GitLab. Therefore, any user who could authenticate with GitLab could bypass the group-based authorization, as they would appear to be a member of any group specified in the configuration.
A Semantic Attack on Google Gemini - Read the Latest Research