CVE-2021-46440: Strapi Insecure Password Handling Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-85vg-grr5-pw42
CVSS 7.5
CWE-922
Published
Advisory Summary

CVE-2021-46440 is a HIGH (CVSS 7.5) insecure password handling vulnerability vulnerability (CWE-922: Insecure Storage of Sensitive Information) affecting Strapi libraries in the npm ecosystem. The issue involves insecure password handling vulnerability in strapi. Remediation is available by upgrading affected packages to version 3.6.9, 4.1.5.

CVE-2021-46440 at a Glance

CVE Identifier CVE-2021-46440
GHSA Identifier GHSA-85vg-grr5-pw42
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-922: Insecure Storage of Sensitive Information
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:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

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

How to Fix CVE-2021-46440

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.5
npm install @strapi/strapi@4.1.5
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-2021-46440, 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-922: Insecure Storage of Sensitive Information, where the product stores sensitive information without properly limiting read or write access by 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

Storing passwords in a recoverable format in the DOCUMENTATION plugin component of Strapi before 3.6.9 and 4.x before 4.1.5 allows an attacker to access a victim's HTTP request. From this, the attacker can get the victim's cookie, base64 decode it, and obtain a cleartext password, leading to getting API documentation for further API attacks.

CVE-2021-46440 Affected Strapi Versions

2 component(s)
Fixed Versions:
3.6.94.1.5
Product / Package Ecosystem Affected Versions Fixed Version
strapi
npm
< 3.6.9
3.6.9
@strapi/strapi
npm
≥ 4.0.0
< 4.1.5
4.1.5

References

Frequently Asked Questions

What is CVE-2021-46440?
CVE-2021-46440 is a security vulnerability in Strapi involving Insecure password handling vulnerability in Strapi under CWE-922: Insecure Storage of Sensitive Information.
Which Strapi versions are affected?
Affected versions include releases prior to 3.6.9, 4.1.5 across affected packages: strapi, @strapi/strapi.
What version fixes CVE-2021-46440?
Upgrading to 3.6.9, 4.1.5 (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.5. Upgrade your dependency to 4.1.5 or later.
What is the CVSS score of CVE-2021-46440?
CVE-2021-46440 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2021-46440?
CVE-2021-46440 is classified under CWE-922: Insecure Storage of Sensitive Information (The product stores sensitive information without properly limiting read or write access by unauthorized actors.).
How can I check npm dependencies for CVE-2021-46440?
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-85vg-grr5-pw42",
  "modified" : "2022-05-18T19:29:59Z",
  "published" : "2022-05-04T00:00:22Z",
  "aliases" : [ "CVE-2021-46440" ],
  "summary" : "Insecure password handling vulnerability in Strapi",
  "details" : "Storing passwords in a recoverable format in the DOCUMENTATION plugin component of Strapi before 3.6.9 and 4.x before 4.1.5 allows an attacker to access a victim's HTTP request. From this, the attacker can get the victim's cookie, base64 decode it, and obtain a cleartext password, leading to getting API documentation for further API attacks.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "strapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@strapi/strapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.1.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-46440"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/pull/12246"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://hub.docker.com/r/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://strapi.io"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/166915/Strapi-3.6.8-Password-Disclosure-Insecure-Handling.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-922" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-05-18T19:29:59Z",
    "nvd_published_at" : "2022-05-03T18:15:00Z"
  }
}