CVE-2021-46440: Strapi Insecure Password Handling Vulnerability Vulnerability
HIGHCVE-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
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).
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.
npm install strapi@3.6.9
npm install @strapi/strapi@4.1.5
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
CVE-2021-46440 Affected Strapi Versions
2 component(s)| 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?
Which Strapi versions are affected?
What version fixes CVE-2021-46440?
Is strapi affected?
Is @strapi/strapi affected?
What is the CVSS score of CVE-2021-46440?
What CWE is associated with CVE-2021-46440?
How can I check npm dependencies for CVE-2021-46440?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}