CVE-2021-39192: Privilege escalation All Users Can Access Admin-level Vulnerability
MODERATECVE-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
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).
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.
npm install ghost@4.10.0
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
CVE-2021-39192 Affected Privilege escalation Versions
1 component(s)| 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?
Which Privilege escalation versions are affected?
What version fixes CVE-2021-39192?
Is ghost affected?
What is the CVSS score of CVE-2021-39192?
What CWE is associated with CVE-2021-39192?
How can I check npm dependencies for CVE-2021-39192?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}