GHSA-wfrj-qqc2-83cm: Ghost Remote Command Injection When Using Vulnerability
MODERATEGHSA-wfrj-qqc2-83cm is a MODERATE (CVSS 5.8) remote command injection when using vulnerability (CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')) affecting Ghost libraries in the npm ecosystem. The issue involves remote command injection when using sendmail email transport. Remediation is available by upgrading affected packages to version 4.15.0.
GHSA-wfrj-qqc2-83cm at a Glance
Security Impact
CVSS: 5.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:C/C:N/I:L/A:N).
How to Fix GHSA-wfrj-qqc2-83cm
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.15.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 GHSA-wfrj-qqc2-83cm, 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.15.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-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection'), where the product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string. 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-wfrj-qqc2-83cm Affected Ghost Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ghost
|
npm |
< 4.15.0
|
4.15.0
|
References
Frequently Asked Questions
What is GHSA-wfrj-qqc2-83cm?
Which Ghost versions are affected?
What version fixes GHSA-wfrj-qqc2-83cm?
Is ghost affected?
What is the CVSS score of GHSA-wfrj-qqc2-83cm?
What CWE is associated with GHSA-wfrj-qqc2-83cm?
How can I check npm dependencies for GHSA-wfrj-qqc2-83cm?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wfrj-qqc2-83cm",
"modified" : "2021-09-17T17:48:56Z",
"published" : "2021-09-20T19:52:41Z",
"aliases" : [ ],
"summary" : "Remote command injection when using sendmail email transport",
"details" : "### Impact\n\nSites using the `sendmail` transport as part of their `mail` config are vulnerable to remote command injection due to a [vulnerability](https://github.com/advisories/GHSA-48ww-j4fc-435p) in the `nodemailer` dependency.\n\nGhost defaults to the `direct` transport so this is only exploitable if the `sendmail` transport is explicitly used.\n\n### Patches\n\nFixed in 4.15.0, all sites should upgrade as soon as possible.\n\n### Workarounds\n\n* Use an alternative email transport as described in the [docs](https://ghost.org/docs/config/#mail). \n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* email us at security@ghost.org\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ghost"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.15.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/TryGhost/Ghost/security/advisories/GHSA-wfrj-qqc2-83cm"
}, {
"type" : "WEB",
"url" : "https://github.com/TryGhost/Ghost/commit/93e4b2eafd18bc8e4c17924e0824e73617e7940c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/TryGhost/Ghost"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-48ww-j4fc-435p"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-88" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-17T17:48:56Z",
"nvd_published_at" : null
}
}