Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Low severity, with a CVSS score of 3.1, published 18 April 2023.
- Which products and versions are affected?
- @strapi/plugin-users-permissions (npm) SEMVER:introduced=3.2.1,fixed=4.6.0.
- Is there a fix for This vulnerability?
- Yes. @strapi/plugin-users-permissions (npm): upgrade to 4.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network.
- Am I affected?
- Check whether you run @strapi/plugin-users-permissions (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- @strapi/plugin-users-permissions (npm): upgrade to 4.6.0 or later
npm install @strapi/plugin-users-permissions@4.6.0
Technical details
The vulnerability is a JWT token validation bypass in the AWS Cognito OAuth provider for Strapi's users-permissions plugin. When processing the OAuth callback at /api/auth/cognito/callback, Strapi does not verify ID and access tokens, allowing an attacker to forge tokens signed with the 'None' algorithm to bypass authentication. The attack requires network access to the callback endpoint and no user interaction or authentication, but is restricted to users already configured with AWS Cognito as their login provider. An attacker can craft a valid JWT with claims for any existing user (identified by email and cognito:username) and gain full access to that account. The fix, included in Strapi 4.6.0 and later, adds proper token verification using JWKS public key validation.
Affected products
- Strapi @strapi/plugin-users-permissions >=3.2.1, <4.6.0
Timeline
- 2023-04-18: disclosed
- 2023-04-18: patched: Fixed in Strapi v4.6.0