High

Authentication Bypass in @strapi/plugin-users-permissions

  • Disclosed: 18.04.2023
  • Updated: 11.10.2026 10:22

Summary

Strapi through 4.5.6 does not verify the access or ID tokens issued during the OAuth flow when the AWS Cognito login provider is used for authentication.

Details

Strapi through 4.5.6 does not verify the access or ID tokens issued during the OAuth flow when the AWS Cognito login provider is used for authentication. A remote attacker could forge an ID token that is signed using the 'None' type algorithm to bypass authentication and impersonate any user that use AWS Cognito for authentication.

IoC

Reviewing of application logs is recommended to detect any suspicious activity. Running the following regex pattern will extract all ID tokens sent to /api/auth/cognito/callback.

/\/api\/auth\/cognito\/callback\?[\s\S]*id_token=\s*([\S]*)/

Once you have a list of the ID tokens, you will need to verify each token using the public key file for your AWS Cognito user pool that you can download from https://cognito-idp.{region}.amazonaws.com/{userPoolId}/.well-known/jwks.json. If there are any JWT tokens that cannot be verified using the correct public key, then you need to inspect the JWT body and see if it contains the email and cognito:username claims (example below).

js
{
  "cognito:username": "auth-bypass-example",
  "email": "user@example.com"
}

If there are any JWTs that have this body, verify when the account with the email address was created. If the account was created earlier than the request to /api/auth/cognito/callback with the invalid JWT token, then you need to contact the user to inform them their account has been breached!

After upgrading to Strapi v4.6.0 or greater you will need to reconfigure your AWS Cognito provider to include the JWKS URL for it to work properly. If you do not reconfigure your provider you will receive an error message when attempting to login.

Impact

Any Strapi user using the users-permissions AWS Cognito provider before 4.6.0

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @strapi/plugin-users-permissions >= 3.2.1, < 4.6.0 4.6.0

References

CVSS score 8.2/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N
Weakness (CWE)
-
Platform
npm
Package
@strapi/plugin-users-permissions
Disclosed
18.04.2023
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-xv3q-jrmm-4fxv - CC BY 4.0

Vulnerability history: @strapi/plugin-users-permissions

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
8
First → latest
04.2023 05.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 4
  • Medium 2
  • Low 1

Disclosures per year

  1. 2023: 5
  2. 2024: 1
  3. 2025: 0
  4. 2026: 2
  1. High · 7.6 CVE-2023-39345 >= 4.0.0, < 4.13.1 4.13.1
  2. High · 7.3 CVE-2023-38507 < 4.12.1 4.12.1
  3. Authentication Bypass in @strapi/plugin-users-permissions this entry
    High · 8.2 ghsa-xv3q-jrmm-4fxv >= 3.2.1, < 4.6.0 4.6.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.