CVE-2021-39192: Privilege escalation All Users Can Access Admin-level Vulnerability

MODERATE
Advisory Identifier: GHSA-j5c2-hm46-wp5c
CVSS 6.5
CWE-269 CWE-200
Published
Advisory Summary

CVE-2021-39192 is a MODERATE (CVSS 6.5) all users can access admin-level vulnerability (CWE-269: Improper Privilege Management) affecting Privilege escalation libraries in the npm ecosystem. The issue involves all users can access admin-level api keys. Remediation is available by upgrading affected packages to version 4.10.0.

CVE-2021-39192 at a Glance

CVE Identifier CVE-2021-39192
GHSA Identifier GHSA-j5c2-hm46-wp5c
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-269: Improper Privilege Management
Affected Product Privilege escalation
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:H/UI:N/S:U/C:H/I:H/A:N).

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

How to Fix CVE-2021-39192

To remediate this vulnerability, upgrade all affected Privilege escalation dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

ghost fixed: 4.10.0
npm install ghost@4.10.0
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 ghost

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-39192, inspect your project dependencies using npm:

npm ls ghost

Analyze the terminal output to locate any version of Privilege escalation in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.10.0), your application is affected.

Note: The npm ls ghost 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor. In Privilege escalation, 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

### Impact An error in the implementation of the limits service in 4.0.0 allows all authenticated users (including contributors) to view admin-level API keys via the integrations API endpoint, leading to a privilege escalation vulnerability. Ghost(Pro) has already been patched. Self-hosters are impacted if running Ghost a version between 4.0.0 and 4.9.4. Immediate action should be taken to secure your site - see patches & workarounds below. It is highly recommended to regenerate all API keys after patching or applying the workaround below. ### Patches Fixed in 4.10.0, all 4.x sites should upgrade as soon as possible. ### Workarounds - Disable all non-Administrator accounts to prevent API access. ### For more information If you have any questions or comments about this advisory: * email us at security@ghost.org --- Credits: Aden Yap Chuen Zhen, BAE Systems Applied Intelligence (Malaysia)

CVE-2021-39192 Affected Privilege escalation Versions

1 component(s)
Fixed Versions:
4.10.0
Product / Package Ecosystem Affected Versions Fixed Version
ghost
npm
≥ 4.0.0
< 4.10.0
4.10.0

References

Frequently Asked Questions

What is CVE-2021-39192?
CVE-2021-39192 is a security vulnerability in Privilege escalation involving all users can access Admin-level API keys under CWE-269: Improper Privilege Management.
Which Privilege escalation versions are affected?
Affected versions include releases prior to 4.10.0 across affected packages: ghost.
What version fixes CVE-2021-39192?
Upgrading to 4.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ghost affected?
Yes, ghost is affected in releases prior to 4.10.0. Upgrade your dependency to 4.10.0 or later.
What is the CVSS score of CVE-2021-39192?
CVE-2021-39192 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2021-39192?
CVE-2021-39192 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check npm dependencies for CVE-2021-39192?
Run the dependency tree command: 'npm ls ghost'. 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-j5c2-hm46-wp5c",
  "modified" : "2021-09-03T20:23:05Z",
  "published" : "2021-07-22T19:43:16Z",
  "aliases" : [ "CVE-2021-39192" ],
  "summary" : "Privilege escalation: all users can access Admin-level API keys",
  "details" : "### Impact\nAn error in the implementation of the limits service in 4.0.0 allows all authenticated users (including contributors) to view admin-level API keys via the integrations API endpoint, leading to a privilege escalation vulnerability.\n\nGhost(Pro) has already been patched. Self-hosters are impacted if running Ghost a version between 4.0.0 and 4.9.4. Immediate action should be taken to secure your site - see patches & workarounds below.\n\nIt is highly recommended to regenerate all API keys after patching or applying the workaround below.\n\n### Patches\nFixed in 4.10.0, all 4.x sites should upgrade as soon as possible.\n\n### Workarounds\n- Disable all non-Administrator accounts to prevent API access.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* email us at security@ghost.org\n\n---\nCredits: Aden Yap Chuen Zhen, BAE Systems Applied Intelligence (Malaysia)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "ghost"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "4.10.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/TryGhost/Ghost/security/advisories/GHSA-j5c2-hm46-wp5c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-39192"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/TryGhost/Ghost"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/TryGhost/Ghost/releases/tag/v4.10.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-269" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-07-20T17:44:30Z",
    "nvd_published_at" : "2021-09-03T15:15:00Z"
  }
}