{"answers":{"affected":"2 open source packages ship an affected version, including @strapi/plugin-users-permissions.","exploited":"There is no known exploitation of GHSA-xv3q-jrmm-4fxv in the wild and no public exploit code.","fix":"Upgrade @strapi/plugin-users-permissions to 4.6.0 or later.","what":"GHSA-xv3q-jrmm-4fxv is an authentication bypass vulnerability in @strapi/plugin-users-permissions, published on 18 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-xv3q-jrmm-4fxv and fix it if it is affected.\n\nWhat it is: GHSA-xv3q-jrmm-4fxv is an authentication bypass vulnerability in @strapi/plugin-users-permissions, published on 18 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-xv3q-jrmm-4fxv in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @strapi/plugin-users-permissions (npm): affected from 3.2.1; fixed in 4.6.0\n- @strapi/plugin-users-permissions (npm): affected from 3.2.1; fixed in 4.6.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-xv3q-jrmm-4fxv/ (Markdown: https://insights.sbomify.com/GHSA-xv3q-jrmm-4fxv/index.md)","id":"GHSA-xv3q-jrmm-4fxv","markdown":"https://insights.sbomify.com/GHSA-xv3q-jrmm-4fxv/index.md","name":"GHSA-xv3q-jrmm-4fxv","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["account_takeover","privilege_escalation"],"network_reachable":"yes","non_default_config":true,"product_category":"Strapi CMS plugin","requires_auth":"none","summary":"Attackers can bypass authentication and impersonate users by forging JWTs when using the AWS Cognito provider in Strapi.","user_interaction":"not_required","vuln_class":"auth_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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### Impact\n\nAny Strapi user using the users-permissions AWS Cognito provider before 4.6.0","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Authentication Bypass in @strapi/plugin-users-permissions","id":"GHSA-xv3q-jrmm-4fxv","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"auth_bypass","year":"2023"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["4.6.0"],"introduced":["3.2.1"],"last_affected":[],"package":"@strapi/plugin-users-permissions","purl":null,"source":"GHSA-xv3q-jrmm-4fxv"},{"ecosystem":"npm","fixed":["4.6.0"],"introduced":["3.2.1"],"last_affected":[],"package":"@strapi/plugin-users-permissions","purl":"pkg:npm/%40strapi/plugin-users-permissions","source":"GHSA-xv3q-jrmm-4fxv"}],"products":null,"published":"2023-04-18","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can bypass authentication and impersonate users by forging JWTs when using the AWS Cognito provider in Strapi.","url":"https://insights.sbomify.com/GHSA-xv3q-jrmm-4fxv/"}