The vulnerability allows an authenticated user to bypass SSO enforcement by modifying their own account settings. The root cause is improper privilege management in the self-service settings update endpoint. The provided patch addresses this by introducing a new, more restrictive Data Transfer Object (DTO), UserSelfSettingsUpdateRequestDto, for the user-facing endpoint (/me/settings).
Previously, the MeController.updateCurrentUserSettings method used the SettingsUpdateRequestDto, which was a general-purpose DTO that included sensitive, admin-only fields like allowSSOManualLogin. By sending a PATCH request to /me/settings with {"allowSSOManualLogin": true}, a user could disable the SSO requirement for their account.
The fix replaces SettingsUpdateRequestDto with UserSelfSettingsUpdateRequestDto in the MeController.updateCurrentUserSettings method. The new DTO explicitly omits allowSSOManualLogin and other sensitive properties, ensuring that users cannot modify these settings themselves. The backend now relies on Zod validation to strip any extraneous fields from the request payload, effectively preventing the SSO bypass. The key vulnerable function is the controller method on the backend that processed this malicious request.