GHSA-7v28-g2pq-ggg8: Ghost Remote Code Execution Vulnerability
MODERATEGHSA-7v28-g2pq-ggg8 is a MODERATE (CVSS 6.6) remote code execution vulnerability (General Security Weakness) affecting Ghost libraries in the npm ecosystem. The issue involves ghost vulnerable to remote code execution in locale setting change. Remediation is available by upgrading affected packages to version 4.48.2, 5.2.3.
GHSA-7v28-g2pq-ggg8 at a Glance
Security Impact
CVSS: 6.6
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:C/C:L/I:L/A:L).
How to Fix GHSA-7v28-g2pq-ggg8
To remediate this vulnerability, upgrade all affected Ghost 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.48.2
npm install ghost@5.2.3
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 GHSA-7v28-g2pq-ggg8, inspect your project dependencies using npm:
npm ls ghost
Analyze the terminal output to locate any version of Ghost in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.48.2), 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 General Security Weakness. In Ghost, 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
GHSA-7v28-g2pq-ggg8 Affected Ghost Versions
2 component(s)References
Frequently Asked Questions
What is GHSA-7v28-g2pq-ggg8?
Which Ghost versions are affected?
What version fixes GHSA-7v28-g2pq-ggg8?
Is ghost affected?
What is the CVSS score of GHSA-7v28-g2pq-ggg8?
What CWE is associated with GHSA-7v28-g2pq-ggg8?
How can I check npm dependencies for GHSA-7v28-g2pq-ggg8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7v28-g2pq-ggg8",
"modified" : "2022-08-10T22:15:39Z",
"published" : "2022-06-17T01:16:03Z",
"aliases" : [ ],
"summary" : "Ghost vulnerable to remote code execution in locale setting change",
"details" : "### Impact\n\nA [vulnerability](https://www.cve.org/CVERecord?id=CVE-2022-24785) in an upstream library means an authenticated attacker can abuse locale input to execute arbitrary commands from a file that has previously been uploaded using the file upload functionality in the post editor.\n\n### Patches\n\nFixed in 5.2.3, all 5.x sites should update as soon as possible.\nFixed in 4.48.2, all 4.x sites should update as soon as possible.\n\n### Workarounds\n\nPatched versions of Ghost add validation to the locale input to prevent execution of arbitrary files. Updating Ghost is the quickest complete solution.\n\nAs a workaround, if for any reason you cannot update your Ghost instance, you can block the `POST /ghost/api/admin/settings/` endpoint, which will also disable updating settings for your site.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Email us at [security@ghost.org](mailto:security@ghost.org)\n\n### Credits\n\n* devx00 - https://twitter.com/devx00",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ghost"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.48.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "ghost"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/TryGhost/Ghost/security/advisories/GHSA-7v28-g2pq-ggg8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/TryGhost/Ghost"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T01:16:03Z",
"nvd_published_at" : null
}
}