VYPR
Critical severityNVD Advisory· Published Apr 12, 2022· Updated Aug 3, 2024

CVE-2022-27139

CVE-2022-27139

Description

An arbitrary file upload vulnerability in the file upload module of Ghost v4.39.0 allows attackers to execute arbitrary code via a crafted SVG file. NOTE: Vendor states that as outlined in Ghost's security documentation, upload of SVGs is only possible by trusted authenticated users. The uploading of SVG files to Ghost does not represent a remote code execution vulnerability. SVGs are not executable on the server, and may only execute javascript in a client's browser - this is expected and intentional functionality

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Ghost v4.39.0 file upload module allows arbitrary file upload, enabling XSS attacks via SVG files by authenticated users.

Vulnerability

The vulnerability resides in the file upload module of Ghost v4.39.0, where there is an arbitrary file upload issue. Specifically, the module allows trusted authenticated users to upload SVG files. While not leading to server-side code execution, the uploaded SVG files can contain JavaScript code that executes in the context of a victim's browser when the SVG is accessed. This is considered a client-side code execution (cross-site scripting) vulnerability, as the attacker can achieve arbitrary script execution in the viewer's browser. The affected version is Ghost v4.39.0, as per the CVE description [1].

Exploitation

An attacker must be a trusted authenticated user with upload privileges in the Ghost CMS. The attacker crafts an SVG file containing malicious JavaScript and uploads it via the file upload module. The SVG file, once uploaded, is stored and can be served to other users. When a victim (e.g., another user or site visitor) views the page containing the SVG, the embedded JavaScript executes in their browser. The exploitation does not require any additional user interaction beyond viewing the SVG. The attacker cannot achieve server-side code execution via this upload; the impact is limited to client-side scripting attacks [1][2].

Impact

Successful exploitation allows the attacker to execute arbitrary JavaScript in the context of the victim's browser session on the Ghost site. This leads to full XSS impact: the attacker can potentially steal session cookies, perform actions on behalf of the victim (such as creating posts, modifying site content, or escalating privileges if the victim is an admin), deface the site, or redirect users to malicious domains. The vulnerability does not allow server-side code execution or file system access; all impact is confined to the client-side of authenticated users who view the SVG [1].

Mitigation

According to the Ghost vendor, this behavior is expected and intentional. Ghost's security documentation states that SVG uploads are restricted to trusted authenticated users and that SVGs are not executable on the server; any JavaScript execution occurs in the browser and is considered a client-side feature rather than a vulnerability. Therefore, there is no patch or planned fix. The vendor considers the security boundary to be the trusted user group; mitigation relies on ensuring that only trusted, non-malicious users have upload privileges. No fixed version has been released, and this is not listed on CISA's Known Exploited Vulnerabilities (KEV) catalog. Users should enforce strict access controls and may consider disabling SVG uploads via custom configuration if client-side XSS is a concern [1][2].

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
ghostnpm
<= 4.39.0

Affected products

3
  • Ghost/Ghostdescription
  • osv-coords2 versions
    >= 4.39.0, < 4.39.1+ 1 more
    • (no CPE)range: >= 4.39.0, < 4.39.1
    • (no CPE)range: <= 4.39.0

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

4

News mentions

0

No linked articles in our index yet.