CVE-2019-18818: Strapi Strapi Allows Unauthenticated Attacker To Vulnerability

CRITICAL
Advisory Identifier: GHSA-6xc2-mj39-q599
CVSS 9.8
CWE-640
Published
Advisory Summary

CVE-2019-18818 is a CRITICAL (CVSS 9.8) strapi allows unauthenticated attacker to vulnerability (CWE-640: Weak Password Recovery Mechanism for Forgotten Password) affecting Strapi libraries in the npm ecosystem. The issue involves strapi allows unauthenticated attacker to reset admin password without valid reset token. Remediation is available by upgrading affected packages to version 3.0.0-beta.17.5.

CVE-2019-18818 at a Glance

CVE Identifier CVE-2019-18818
GHSA Identifier GHSA-6xc2-mj39-q599
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-640: Weak Password Recovery Mechanism for Forgotten Password
Affected Product Strapi
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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

How to Fix CVE-2019-18818

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.0-beta.17.5
npm install strapi@3.0.0-beta.17.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-2019-18818, 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.0-beta.17.5), 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-640: Weak Password Recovery Mechanism for Forgotten Password, where the product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak. 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

Versions of `strapi` prior to 3.0.0-beta.17.5 are vulnerable to Privilege Escalation. The password reset routes allows an unauthenticated attacker to reset an admin's password without providing a valid password reset token. ## Recommendation Upgrade to version 3.0.0-beta.17.5 or later.

CVE-2019-18818 Affected Strapi Versions

1 component(s)
Fixed Versions:
3.0.0-beta.17.5
Product / Package Ecosystem Affected Versions Fixed Version
strapi
npm
< 3.0.0-beta.17.5
3.0.0-beta.17.5

References

Frequently Asked Questions

What is CVE-2019-18818?
CVE-2019-18818 is a security vulnerability in Strapi involving Strapi allows unauthenticated attacker to reset admin password without valid reset token under CWE-640: Weak Password Recovery Mechanism for Forgotten Password.
Which Strapi versions are affected?
Affected versions include releases prior to 3.0.0-beta.17.5 across affected packages: strapi.
What version fixes CVE-2019-18818?
Upgrading to 3.0.0-beta.17.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.0.0-beta.17.5. Upgrade your dependency to 3.0.0-beta.17.5 or later.
What is the CVSS score of CVE-2019-18818?
CVE-2019-18818 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2019-18818?
CVE-2019-18818 is classified under CWE-640: Weak Password Recovery Mechanism for Forgotten Password (The product contains a mechanism for users to recover or change their passwords without knowing the original password, but the mechanism is weak.).
How can I check npm dependencies for CVE-2019-18818?
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-6xc2-mj39-q599",
  "modified" : "2022-08-02T15:09:07Z",
  "published" : "2019-12-02T18:20:41Z",
  "aliases" : [ "CVE-2019-18818" ],
  "summary" : "Strapi allows unauthenticated attacker to reset admin password without valid reset token",
  "details" : "Versions of `strapi` prior to 3.0.0-beta.17.5 are vulnerable to Privilege Escalation. The password reset routes allows an unauthenticated attacker to reset an admin's password without providing a valid password reset token.\n\n\n## Recommendation\n\nUpgrade to version 3.0.0-beta.17.5 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "strapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.0.0-beta.17.5"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.0.0-beta.17.4"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-18818"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/pull/4443"
  }, {
    "type" : "WEB",
    "url" : "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-18818"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/strapi/strapi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/strapi/strapi/releases/tag/v3.0.0-beta.17.5"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1311"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/163939/Strapi-3.0.0-beta-Authentication-Bypass.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/163950/Strapi-CMS-3.0.0-beta.17.4-Remote-Code-Execution.html"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/165896/Strapi-CMS-3.0.0-beta.17.4-Privilege-Escalation.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-640" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-12-02T17:36:24Z",
    "nvd_published_at" : "2019-11-07T22:15:00Z"
  }
}