GHSA-xv3q-jrmm-4fxv: @strapi/plugin users permissions Authentication Bypass Vulnerability
HIGHGHSA-xv3q-jrmm-4fxv is a HIGH (CVSS 8.2) authentication bypass vulnerability (General Security Weakness) affecting @strapi/plugin users permissions libraries in the npm ecosystem. The issue involves authentication bypass in @strapi/plugin-users-permissions. Remediation is available by upgrading affected packages to version 4.6.0.
GHSA-xv3q-jrmm-4fxv at a Glance
Security Impact
CVSS: 8.2
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N).
How to Fix GHSA-xv3q-jrmm-4fxv
To remediate this vulnerability, upgrade all affected @strapi/plugin users permissions dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @strapi/plugin-users-permissions@4.6.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @strapi/plugin-users-permissions
How to Check if You Are Affected
To determine whether your Node.js application is affected by GHSA-xv3q-jrmm-4fxv, inspect your project dependencies using npm:
npm ls @strapi/plugin-users-permissions
Analyze the terminal output to locate any version of @strapi/plugin users permissions in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.6.0), your application is affected.
Note: The npm ls @strapi/plugin-users-permissions command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under General Security Weakness. In @strapi/plugin users permissions, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-xv3q-jrmm-4fxv Affected @strapi/plugin users permissions Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@strapi/plugin-users-permissions
|
npm |
≥ 3.2.1
< 4.6.0
|
4.6.0
|
References
Frequently Asked Questions
What is GHSA-xv3q-jrmm-4fxv?
Which @strapi/plugin users permissions versions are affected?
What version fixes GHSA-xv3q-jrmm-4fxv?
Is @strapi/plugin-users-permissions affected?
What is the CVSS score of GHSA-xv3q-jrmm-4fxv?
What CWE is associated with GHSA-xv3q-jrmm-4fxv?
How can I check npm dependencies for GHSA-xv3q-jrmm-4fxv?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xv3q-jrmm-4fxv",
"modified" : "2023-04-18T22:28:02Z",
"published" : "2023-04-18T22:28:02Z",
"aliases" : [ ],
"summary" : "Authentication Bypass in @strapi/plugin-users-permissions",
"details" : "### Summary\n\nStrapi 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.\n\n### Details\n\nStrapi 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.\n\n### IoC\n\nReviewing 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`.\n\n`/\\/api\\/auth\\/cognito\\/callback\\?[\\s\\S]*id_token=\\s*([\\S]*)/`\n\nOnce 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).\n\n```json\n{\n \"cognito:username\": \"auth-bypass-example\",\n \"email\": \"user@example.com\"\n}\n```\n\nIf 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!\n\nAfter 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.\n\n\n### Impact\n\nAny Strapi user using the users-permissions AWS Cognito provider before 4.6.0\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@strapi/plugin-users-permissions"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.2.1"
}, {
"fixed" : "4.6.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/security/advisories/GHSA-xv3q-jrmm-4fxv"
}, {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/pull/15382"
}, {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/commit/d0edd25ceb49d275d710bf8d59999a2c07072893"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/strapi/strapi"
}, {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/releases/tag/v4.6.0"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-04-18T22:28:02Z",
"nvd_published_at" : null
}
}