CVE-2022-30618: Strapi Improper Removal Of Sensitive Information Vulnerability

HIGH
Advisory Identifier: GHSA-vgj7-895j-gpr6
CVSS 7.5
CWE-212
Published
Advisory Summary

CVE-2022-30618 is a HIGH (CVSS 7.5) improper removal of sensitive information vulnerability (CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer) affecting Strapi libraries in the npm ecosystem. The issue involves improper removal of sensitive information before storage or transfer in strapi. Remediation is available by upgrading affected packages to version 3.6.9, 4.1.9.

CVE-2022-30618 at a Glance

CVE Identifier CVE-2022-30618
GHSA Identifier GHSA-vgj7-895j-gpr6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer
Affected Product Strapi
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

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:N/S:U/C:H/I:H/A:H).

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

How to Fix CVE-2022-30618

To remediate this vulnerability, upgrade all affected Strapi 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 fixed: 3.6.9
npm install strapi@3.6.9
@strapi/strapi fixed: 4.1.9
npm install @strapi/strapi@4.1.9
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

How to Check if You Are Affected

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

npm ls strapi

Analyze the terminal output to locate any version of Strapi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.9), your application is affected.

Note: The npm ls strapi 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-212: Improper Removal of Sensitive Information Before Storage or Transfer, where the product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors. In Strapi, 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

An authenticated user with access to the Strapi admin panel can view private and sensitive data, such as email and password reset tokens, for API users if content types accessible to the authenticated user contain relationships to API users (from:users-permissions). There are many scenarios in which such details from API users can leak in the JSON response within the admin panel, either through a direct or indirect relationship. Access to this information enables a user to compromise these users’ accounts if the password reset API endpoints have been enabled. In a worst-case scenario, a low-privileged user could get access to a high-privileged API account, and could read and modify any data as well as block access to both the admin panel and API by revoking privileges for all other users.

CVE-2022-30618 Affected Strapi Versions

2 component(s)
Fixed Versions:
3.6.94.1.9
Product / Package Ecosystem Affected Versions Fixed Version
strapi
npm
≥ 3.0.0
< 3.6.9
3.6.9
@strapi/strapi
npm
< 4.1.9
4.1.9

References

Frequently Asked Questions

What is CVE-2022-30618?
CVE-2022-30618 is a security vulnerability in Strapi involving Improper Removal of Sensitive Information Before Storage or Transfer in Strapi under CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer.
Which Strapi versions are affected?
Affected versions include releases prior to 3.6.9, 4.1.9 across affected packages: strapi, @strapi/strapi.
What version fixes CVE-2022-30618?
Upgrading to 3.6.9, 4.1.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is strapi affected?
Yes, strapi is affected in releases prior to 3.6.9. Upgrade your dependency to 3.6.9 or later.
Is @strapi/strapi affected?
Yes, @strapi/strapi is affected in releases prior to 4.1.9. Upgrade your dependency to 4.1.9 or later.
What is the CVSS score of CVE-2022-30618?
CVE-2022-30618 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-30618?
CVE-2022-30618 is classified under CWE-212: Improper Removal of Sensitive Information Before Storage or Transfer (The product stores, transfers, or shares a resource that contains sensitive information, but it does not properly remove that information before the product makes the resource available to unauthorized actors.).
How can I check npm dependencies for CVE-2022-30618?
Run the dependency tree command: 'npm ls strapi'. 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-vgj7-895j-gpr6",
  "modified" : "2022-06-07T21:17:06Z",
  "published" : "2022-05-20T00:00:28Z",
  "aliases" : [ "CVE-2022-30618" ],
  "summary" : "Improper Removal of Sensitive Information Before Storage or Transfer in Strapi",
  "details" : "An authenticated user with access to the Strapi admin panel can view private and sensitive data, such as email and password reset tokens, for API users if content types accessible to the authenticated user contain relationships to API users (from:users-permissions). There are many scenarios in which such details from API users can leak in the JSON response within the admin panel, either through a direct or indirect relationship. Access to this information enables a user to compromise these users’ accounts if the password reset API endpoints have been enabled. In a worst-case scenario, a low-privileged user could get access to a high-privileged API account, and could read and modify any data as well as block access to both the admin panel and API by revoking privileges for all other users.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "strapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.6.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/strapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.1.9"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-30618"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://www.synopsys.com/blogs/software-security/cyrc-advisory-strapi"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-212" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-07T21:17:06Z",
    "nvd_published_at" : "2022-05-19T18:15:00Z"
  }
}