Simple OAuth (OAuth2) & OpenID Connect
The module does not properly restrict who can configure the access settings. An administrator account could create malicious settings to gain full control over the site as another user. They could view any information or alter any data including the code itself.
- Who could do thisOnly someone with an administrator login.
- Does it apply to youSites are affected if an attacker has the access right to add or update consumer settings.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this critical. Cyber Essentials expects a fix within 14 days. Do it this week.
Tell your developerUpdate Simple OAuth (OAuth2) & OpenID Connect to 5.2.6, 6.0.10 or 6.1.4, whichever branch you are on.
For developers: what the fix changed
The fix introduces a new validation constraint `Oauth2PrivilegedConsumerField` and its validator in `src/Plugin/Validation/Constraint/Oauth2PrivilegedConsumerFieldValidator.php` to restrict modifications to privileged consumer fields. It requires the new `administer consumer access settings` permission to change the `roles`, `user_id` and `third_party` fields, preventing unauthorised privilege escalation.
Also in this release The release also updates GitLab CI templates, reduces logging severity for expired tokens, fixes authorisation for clients with empty string secrets and prevents echoing request headers.
.gitlab-ci.yml+22 −106config/install/simple_oauth.oauth2_token.bundle.access_token.yml+1 −0config/install/simple_oauth.oauth2_token.bundle.auth_code.yml+1 −0config/install/simple_oauth.oauth2_token.bundle.refresh_token.yml+1 −0simple_oauth.module+11 −0 fixsimple_oauth.permissions.yml+5 −0 fixsimple_oauth.services.yml+9 −1src/Authentication/Provider/SimpleOauthAuthenticationProvider.php+29 −11src/Controller/Oauth2AuthorizeController.php+20 −6src/Controller/Oauth2Token.php+19 −3src/Entity/Form/Oauth2GenerateKeyForm.php+14 −3src/EventSubscriber/ExceptionLoggingSubscriber.php+65 −0