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

HIGH
Advisory Identifier: GHSA-f6fm-r26q-p747
CVSS 8.8
CWE-212
Published
Advisory Summary

CVE-2022-30617 is a HIGH (CVSS 8.8) 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.0.0-beta.15.

CVE-2022-30617 at a Glance

CVE Identifier CVE-2022-30617
GHSA Identifier GHSA-f6fm-r26q-p747
Severity HIGH
CVSS v3.1 Base Score 8.8
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: 8.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
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-30617

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.0.0-beta.15
npm install @strapi/strapi@4.0.0-beta.15
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-30617, 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 other admin panel users that have a relationship (e.g., created by, updated by) with content accessible to the authenticated user. For example, a low-privileged “author” role account can view these details in the JSON response for an “editor” or “super admin” that has updated one of the author’s blog posts. There are also many other scenarios where such details from other users can leak in the JSON response, either through a direct or indirect relationship. Access to this information enables a user to compromise other users’ accounts by successfully invoking the password reset workflow. In a worst-case scenario, a low-privileged user could get access to a “super admin” account with full control over the Strapi instance, 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-30617 Affected Strapi Versions

2 component(s)
Fixed Versions:
3.6.94.0.0-beta.15
Product / Package Ecosystem Affected Versions Fixed Version
strapi
npm
≥ 3.0.0
< 3.6.9
3.6.9
@strapi/strapi
npm
< 4.0.0-beta.15
4.0.0-beta.15

References

Frequently Asked Questions

What is CVE-2022-30617?
CVE-2022-30617 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.0.0-beta.15 across affected packages: strapi, @strapi/strapi.
What version fixes CVE-2022-30617?
Upgrading to 3.6.9, 4.0.0-beta.15 (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.0.0-beta.15. Upgrade your dependency to 4.0.0-beta.15 or later.
What is the CVSS score of CVE-2022-30617?
CVE-2022-30617 has a CVSS v3.1 base score of 8.8 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2022-30617?
CVE-2022-30617 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-30617?
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-f6fm-r26q-p747",
  "modified" : "2022-06-07T21:17:00Z",
  "published" : "2022-05-20T00:00:28Z",
  "aliases" : [ "CVE-2022-30617" ],
  "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 other admin panel users that have a relationship (e.g., created by, updated by) with content accessible to the authenticated user. For example, a low-privileged “author” role account can view these details in the JSON response for an “editor” or “super admin” that has updated one of the author’s blog posts. There are also many other scenarios where such details from other users can leak in the JSON response, either through a direct or indirect relationship. Access to this information enables a user to compromise other users’ accounts by successfully invoking the password reset workflow. In a worst-case scenario, a low-privileged user could get access to a “super admin” account with full control over the Strapi instance, 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:L/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.0.0-beta.15"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.0.0-beta.14"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-30617"
  }, {
    "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:00Z",
    "nvd_published_at" : "2022-05-19T18:15:00Z"
  }
}