CVE-2023-22893: @strapi/plugin users permissions Strapi Does Not Verify The Vulnerability

MODERATE
Advisory Identifier: GHSA-583x-23h9-f5w7
Published
Advisory Summary

CVE-2023-22893 is a MODERATE strapi does not verify the vulnerability (General Security Weakness) affecting @strapi/plugin users permissions libraries in the npm ecosystem. The issue involves strapi does not verify the access or id tokens issued during the oauth flow. Remediation is available by upgrading affected packages to version 4.6.0.

CVE-2023-22893 at a Glance

CVE Identifier CVE-2023-22893
GHSA Identifier GHSA-583x-23h9-f5w7
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product @strapi/plugin users permissions
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2023-22893

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.

@strapi/plugin-users-permissions fixed: 4.6.0
npm install @strapi/plugin-users-permissions@4.6.0
Verify Direct and Transitive Dependencies

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 CVE-2023-22893, 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

Strapi 3.2.1 until 4.6.0 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.

CVE-2023-22893 Affected @strapi/plugin users permissions Versions

1 component(s)
Fixed Versions:
4.6.0
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 CVE-2023-22893?
CVE-2023-22893 is a security vulnerability in @strapi/plugin users permissions involving Strapi does not verify the access or ID tokens issued during the OAuth flow under General Security Weakness.
Which @strapi/plugin users permissions versions are affected?
Affected versions include releases prior to 4.6.0 across affected packages: @strapi/plugin-users-permissions.
What version fixes CVE-2023-22893?
Upgrading to 4.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @strapi/plugin-users-permissions affected?
Yes, @strapi/plugin-users-permissions is affected in releases prior to 4.6.0. Upgrade your dependency to 4.6.0 or later.
What CWE is associated with CVE-2023-22893?
CVE-2023-22893 is classified under General Security Weakness.
How can I check npm dependencies for CVE-2023-22893?
Run the dependency tree command: 'npm ls @strapi/plugin-users-permissions'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-583x-23h9-f5w7",
  "modified" : "2023-04-24T18:43:51Z",
  "published" : "2023-04-19T18:33:22Z",
  "aliases" : [ "CVE-2023-22893" ],
  "summary" : "Strapi does not verify the access or ID tokens issued during the OAuth flow",
  "details" : "Strapi 3.2.1 until 4.6.0 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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/plugin-users-permissions"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.2.1"
      }, {
        "fixed" : "4.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22893"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/commit/46f8f98378338f18b5c6139d0157a8f71bf4de83"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/commit/8bbbd7383a20bb7cb163c8b462baffee559e994f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/commit/eeab43b57707d7ef275076d27be6eabc72bd71a7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/blob/v4.5.6/packages/plugins/users-permissions/server/services/providers-registry.js"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/releases"
  }, {
    "type" : "WEB",
    "url" : "https://strapi.io/blog/security-disclosure-of-vulnerabilities-cve"
  }, {
    "type" : "WEB",
    "url" : "https://www.ghostccamm.com/blog/multi_strapi_vulns"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-04-24T18:43:51Z",
    "nvd_published_at" : "2023-04-19T16:15:07Z"
  }
}