CVE-2020-13961: Strapi Improper Input Validation Vulnerability

MODERATE
Advisory Identifier: GHSA-65wv-528r-m892
CVSS 6.5
CWE-20
Published
Advisory Summary

CVE-2020-13961 is a MODERATE (CVSS 6.5) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Strapi libraries in the npm ecosystem. The issue involves improper input validation in strapi. Remediation is available by upgrading affected packages to version 3.0.2.

CVE-2020-13961 at a Glance

CVE Identifier CVE-2020-13961
GHSA Identifier GHSA-65wv-528r-m892
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Strapi
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2020-13961

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.0.2
npm install strapi@3.0.2
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-2020-13961, 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.0.2), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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

Strapi before 3.0.2 could allow a remote authenticated attacker to bypass security restrictions because templates are stored in a global variable without any sanitation. By sending a specially crafted request, an attacker could exploit this vulnerability to update the email template for both password reset and account confirmation emails.

CVE-2020-13961 Affected Strapi Versions

1 component(s)
Fixed Versions:
3.0.2
Product / Package Ecosystem Affected Versions Fixed Version
strapi
npm
< 3.0.2
3.0.2

References

Frequently Asked Questions

What is CVE-2020-13961?
CVE-2020-13961 is a security vulnerability in Strapi involving Improper Input Validation in strapi under CWE-20: Improper Input Validation.
Which Strapi versions are affected?
Affected versions include releases prior to 3.0.2 across affected packages: strapi.
What version fixes CVE-2020-13961?
Upgrading to 3.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is strapi affected?
Yes, strapi is affected in releases prior to 3.0.2. Upgrade your dependency to 3.0.2 or later.
What is the CVSS score of CVE-2020-13961?
CVE-2020-13961 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2020-13961?
CVE-2020-13961 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check npm dependencies for CVE-2020-13961?
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-65wv-528r-m892",
  "modified" : "2022-06-21T20:05:07Z",
  "published" : "2022-05-24T17:21:16Z",
  "aliases" : [ "CVE-2020-13961" ],
  "summary" : "Improper Input Validation in strapi",
  "details" : "Strapi before 3.0.2 could allow a remote authenticated attacker to bypass security restrictions because templates are stored in a global variable without any sanitation. By sending a specially crafted request, an attacker could exploit this vulnerability to update the email template for both password reset and account confirmation emails.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "strapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-13961"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/pull/6599"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/183045"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/releases/tag/v3.0.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-21T20:05:07Z",
    "nvd_published_at" : "2020-06-19T17:15:00Z"
  }
}