An issue has been discovered in GitLab CE/EE affecting all versions before 15.0.5, all versions starting from 15.1 before 15.1.4, all versions starting from 15.2 before 15.2.1. It may be possible for group members to bypass 2FA enforcement enabled at the group level by using Resource Owner Password Credentials grant to obtain an access token without using 2FA.
https://hackerone.com/reports/1498133
https://gitlab.com/gitlab-org/gitlab/-/issues/355028
https://gitlab.com/gitlab-org/cves/-/blob/master/2022/CVE-2022-2303.json