Vulnerabilities in pkg:npm/@strapi/utils

PACKAGE
Advisory Identifier: GHSA-v8gg-4mq2-88q4
Advisory Summary

CVE-2023-36472 is a MODERATE (CVSS 5.8) strapi may leak sensitive user vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @strapi/plugin content manager libraries in the npm ecosystem. The issue involves strapi may leak sensitive user information, user reset password, tokens via content-manager views. Remediation is available by upgrading affected packages to version 4.11.7.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@strapi/utils

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@strapi/utils. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-v8gg-4mq2-88q4 CVE-2023-36472 MODERATE Strapi may leak sensitive user information, user reset password, tokens via content-manager views
GHSA-9xg4-3qfm-9w8f CVE-2023-34235 HIGH Leaking sensitive user information still possible by filtering on private with prefix fields
GHSA-chmr-rg2f-9jmf CVE-2023-34093 MODERATE Making all attributes on a content-type public without noticing it

CVE-2023-36472 at a Glance

CVE Identifier CVE-2023-36472
GHSA Identifier GHSA-v8gg-4mq2-88q4
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product @strapi/plugin content manager
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-36472

To remediate this vulnerability, upgrade all affected @strapi/plugin content manager 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-content-manager fixed: 4.11.7
npm install @strapi/plugin-content-manager@4.11.7
@strapi/admin fixed: 4.11.7
npm install @strapi/admin@4.11.7
@strapi/utils fixed: 4.11.7
npm install @strapi/utils@4.11.7
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-content-manager

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2023-36472, inspect your project dependencies using npm:

npm ls @strapi/plugin-content-manager

Analyze the terminal output to locate any version of @strapi/plugin content manager in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.11.7), your application is affected.

Note: The npm ls @strapi/plugin-content-manager 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 CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @strapi/plugin content manager, 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

### Summary I can get access to user reset password tokens if I have the configure view permissions ![b37a6fd9eae06027e7d91266f1908a3d](https://user-images.githubusercontent.com/34578426/246782921-fbc007d3-ffec-45de-a1f1-a4287cd507ac.png) ![6c1da5b3bfbb3bca97c8d064be0ecb05](https://user-images.githubusercontent.com/34578426/246783044-7d716dde-6f27-4d01-9521-42720c6ce92e.gif) ### Details /content-manager/relations route does not remove private fields or ensure that they can't be selected ### PoC Install fresh strapi instance start up strapi and create an account create a new content-type give the content-type a relation with admin users and save go to Admin panel roles Author and then plugins. Enable for content-manager collection types the configure view In the collection time now only give them access to the collection you created for this. Create a new admin user account with the Author role Log out and request a password reset for the main admin user. Login on the newly created account go to the collection type you created for this test and click the create new entry button, click in the create new entry view on configure view. select the admin user relation we created click on resetPasswordToken Now go back to the create an entry view and when selection the relation we created we now see the reset tokken ### Impact Impact is that the none admin user now has the reset token of the admin users account and can resets its password using that to escalate his privilege's Still you need the configure view permission to be able to escalate your privilege's

CVE-2023-36472 Affected @strapi/plugin content manager Versions

3 component(s)
Fixed Versions:
4.11.7
Product / Package Ecosystem Affected Versions Fixed Version
@strapi/plugin-content-manager
npm
< 4.11.7
4.11.7
@strapi/admin
npm
< 4.11.7
4.11.7
@strapi/utils
npm
< 4.11.7
4.11.7

References

Frequently Asked Questions

What is CVE-2023-36472?
CVE-2023-36472 is a security vulnerability in @strapi/plugin content manager involving Strapi may leak sensitive user information, user reset password, tokens via content-manager views under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which @strapi/plugin content manager versions are affected?
Affected versions include releases prior to 4.11.7 across affected packages: @strapi/plugin-content-manager, @strapi/admin, @strapi/utils.
What version fixes CVE-2023-36472?
Upgrading to 4.11.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @strapi/plugin-content-manager affected?
Yes, @strapi/plugin-content-manager is affected in releases prior to 4.11.7. Upgrade your dependency to 4.11.7 or later.
Is @strapi/admin affected?
Yes, @strapi/admin is affected in releases prior to 4.11.7. Upgrade your dependency to 4.11.7 or later.
What is the CVSS score of CVE-2023-36472?
CVE-2023-36472 has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N.
What CWE is associated with CVE-2023-36472?
CVE-2023-36472 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2023-36472?
Run the dependency tree command: 'npm ls @strapi/plugin-content-manager'. 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-v8gg-4mq2-88q4",
  "modified" : "2023-09-13T16:31:31Z",
  "published" : "2023-09-13T16:31:31Z",
  "aliases" : [ "CVE-2023-36472" ],
  "summary" : "Strapi may leak sensitive user information, user reset password, tokens via content-manager views",
  "details" : "### Summary\nI can get access to user  reset password tokens if I have the configure view permissions\n![b37a6fd9eae06027e7d91266f1908a3d](https://user-images.githubusercontent.com/34578426/246782921-fbc007d3-ffec-45de-a1f1-a4287cd507ac.png)\n![6c1da5b3bfbb3bca97c8d064be0ecb05](https://user-images.githubusercontent.com/34578426/246783044-7d716dde-6f27-4d01-9521-42720c6ce92e.gif)\n\n### Details\n/content-manager/relations route does not remove private fields or ensure that they can't be selected\n\n### PoC\nInstall fresh strapi instance\nstart up strapi and create an account\ncreate a new content-type\ngive the content-type a relation with admin users and save\ngo to Admin panel roles Author and then plugins.\nEnable for content-manager collection types the configure view\nIn the collection time now only give them access to the collection you created for this.\nCreate a new admin user account with the Author role\nLog out and request a password reset for the main admin user.\nLogin on the newly created account\ngo to the collection type you created for this test and click the create new entry button,\nclick in the create new entry view on configure view.\nselect the admin user relation we created click on resetPasswordToken\nNow go back to the create an entry view and when selection the relation we created we now see the reset tokken\n\n### Impact\nImpact is that the none admin user now has the reset token of the admin users account and can resets its password using that to escalate his privilege's\n\nStill you need the configure view permission to be able to escalate your privilege's ",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/plugin-content-manager"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.11.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/admin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.11.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/utils"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.11.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/security/advisories/GHSA-v8gg-4mq2-88q4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36472"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/releases/tag/v4.11.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-09-13T16:31:31Z",
    "nvd_published_at" : "2023-09-15T19:15:08Z"
  }
}