Simple OAuth (OAuth2) & OpenID Connect
The module could cache a token's access rights in a way that let them be reused for another user's token. An ordinary account on the site could view restricted information and alter or add new data by gaining access rights they do not have.
- Who could do thisOnly someone with a login on your site.
- Does it apply to youAn attacker needs a token and a more privileged user's token with the same scopes must be used first.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate Simple OAuth (OAuth2) & OpenID Connect to 6.1.3.
For developers: what the fix changed
The fix introduces a new cache context `oauth2_subject_roles` in `src/Cache/Oauth2SubjectRolesCacheContext.php` and applies it to `DecoratedUserRolesAccessPolicy` and `Oauth2AccessPolicy` to ensure that cached permissions vary by the token subject's full roles, preventing permission leakage between users with the same scopes.
simple_oauth.services.yml+7 −2 fixsrc/Access/DecoratedUserRolesAccessPolicy.php+23 −5 fixsrc/Access/Oauth2AccessPolicy.php+103 −18 fixsrc/Access/TokenAuthUserResolver.php+45 −0 fixsrc/Cache/Oauth2SubjectRolesCacheContext.php+75 −0 fix