GHSA-7v28-g2pq-ggg8: Ghost Remote Code Execution Vulnerability

MODERATE
CVSS 6.6
Published
Advisory Summary

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

CVE Identifier N/A
GHSA Identifier GHSA-7v28-g2pq-ggg8
Severity MODERATE
CVSS v3.1 Base Score 6.6
CWE Classification General Security Weakness
Affected Product Ghost
Package Ecosystem npm
Published Date
Last Updated

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

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

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

### Impact A [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. ### Patches Fixed in 5.2.3, all 5.x sites should update as soon as possible. Fixed in 4.48.2, all 4.x sites should update as soon as possible. ### Workarounds Patched versions of Ghost add validation to the locale input to prevent execution of arbitrary files. Updating Ghost is the quickest complete solution. As 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. ### For more information If you have any questions or comments about this advisory: * Email us at [security@ghost.org](mailto:security@ghost.org) ### Credits * devx00 - https://twitter.com/devx00

GHSA-7v28-g2pq-ggg8 Affected Ghost Versions

2 component(s)
Fixed Versions:
4.48.25.2.3
Product / Package Ecosystem Affected Versions Fixed Version
ghost
npm
< 4.48.2
4.48.2
ghost
npm
≥ 5.0.0
< 5.2.3
5.2.3

References

Frequently Asked Questions

What is GHSA-7v28-g2pq-ggg8?
GHSA-7v28-g2pq-ggg8 is a security vulnerability in Ghost involving Ghost vulnerable to remote code execution in locale setting change under General Security Weakness.
Which Ghost versions are affected?
Affected versions include releases prior to 4.48.2, 5.2.3 across affected packages: ghost.
What version fixes GHSA-7v28-g2pq-ggg8?
Upgrading to 4.48.2, 5.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ghost affected?
Yes, ghost is affected in releases prior to 4.48.2, 5.2.3. Upgrade your dependency to 4.48.2, 5.2.3 or later.
What is the CVSS score of GHSA-7v28-g2pq-ggg8?
GHSA-7v28-g2pq-ggg8 has a CVSS v3.1 base score of 6.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:L/I:L/A:L.
What CWE is associated with GHSA-7v28-g2pq-ggg8?
GHSA-7v28-g2pq-ggg8 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-7v28-g2pq-ggg8?
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-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
  }
}