GHSA-wfrj-qqc2-83cm: Ghost Remote Command Injection When Using Vulnerability

MODERATE
CVSS 5.8
CWE-88
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-wfrj-qqc2-83cm
Severity MODERATE
CVSS v3.1 Base Score 5.8
CWE Classification CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected Product Ghost
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

ghost fixed: 4.15.0
npm install ghost@4.15.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 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

### Impact Sites 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. Ghost defaults to the `direct` transport so this is only exploitable if the `sendmail` transport is explicitly used. ### Patches Fixed in 4.15.0, all sites should upgrade as soon as possible. ### Workarounds * Use an alternative email transport as described in the [docs](https://ghost.org/docs/config/#mail). ### For more information If you have any questions or comments about this advisory: * email us at security@ghost.org

GHSA-wfrj-qqc2-83cm Affected Ghost Versions

1 component(s)
Fixed Versions:
4.15.0
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?
GHSA-wfrj-qqc2-83cm is a security vulnerability in Ghost involving Remote command injection when using sendmail email transport under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection').
Which Ghost versions are affected?
Affected versions include releases prior to 4.15.0 across affected packages: ghost.
What version fixes GHSA-wfrj-qqc2-83cm?
Upgrading to 4.15.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.15.0. Upgrade your dependency to 4.15.0 or later.
What is the CVSS score of GHSA-wfrj-qqc2-83cm?
GHSA-wfrj-qqc2-83cm has a CVSS v3.1 base score of 5.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N.
What CWE is associated with GHSA-wfrj-qqc2-83cm?
GHSA-wfrj-qqc2-83cm is classified under CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (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.).
How can I check npm dependencies for GHSA-wfrj-qqc2-83cm?
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-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
  }
}