GHSA-9fgx-q25h-jxrg

Suggest an improvement
Source
https://github.com/advisories/GHSA-9fgx-q25h-jxrg
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/04/GHSA-9fgx-q25h-jxrg/GHSA-9fgx-q25h-jxrg.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-9fgx-q25h-jxrg
Aliases
Published
2021-04-29T21:53:18Z
Modified
2023-12-06T00:46:01.500528Z
Severity
  • 6.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N CVSS Calculator
Summary
DOM XSS in Theme Preview
Details

Impact

An unused endpoint added during the development of 4.0.0 has left sites vulnerable to untrusted users gaining access to Ghost Admin. Attackers can gain access by getting logged in users to click a link containing malicious code. Users do not need to enter credentials and may not know they've visited a malicious site.

Ghost(Pro) has already been patched. We can find no evidence that the issue was exploited on Ghost(Pro) prior to the patch being added.

Self-hosters are impacted if running Ghost a version between 4.0.0 and 4.3.2. Immediate action should be taken to secure your site - see patches & workarounds below.

Patches

Fixed in 4.3.3, all 4.x sites should upgrade as soon as possible. As the endpoint is unused, the patch simply removes it.

Workarounds

  • Log out of Ghost Admin
  • Suspend any users who cannot log out
  • Block access to /ghost/preview

Example of how to block access in nginx:

location ~ /ghost/preview {
    rewrite ^(\/(.*\/)?ghost\/)(.*)$ $1 redirect;
}

This redirects the endpoint to /ghost/, which mimics the behaviour after the patch is applied.

References

For more information

If you have any questions or comments about this advisory: * email us at security@ghost.org


Credits: Paul Gerste, SonarSource (https://www.sonarsource.com/)

Database specific
{
    "nvd_published_at": "2021-04-29T21:15:00Z",
    "cwe_ids": [
        "CWE-79"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2021-04-29T20:40:06Z"
}
References

Affected packages

npm / ghost

Package

Affected ranges

Type
SEMVER
Events
Introduced
4.0.0
Fixed
4.3.3