/

CVE-2026-105642

Severity:

HIGH RISK

(8.8)

Code Injection (CWE-94) in Ghost SVG Image Processing

CVE-2026-105642

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A vulnerability in Ghost's bundled image-processing library allows attacker-controlled SVG content associated with a bookmark card to trigger arbitrary command execution on the Ghost server. The issue becomes risky when a staff user, including a Contributor, can create a bookmark card pointing to an attacker-controlled website.

A vulnerability in Ghost's bundled image-processing library allows attacker-controlled SVG content associated with a bookmark card to trigger arbitrary command execution on the Ghost server. The issue becomes risky when a staff user, including a Contributor, can create a bookmark card pointing to an attacker-controlled website.

Affected context

The vulnerability occurs in Ghost deployments using affected versions of the bundled image-processing functionality for bookmark cards. It may be present when a staff user can create a bookmark card for an external site and the server processes attacker-controlled SVG content obtained through that workflow.

The vulnerability occurs in Ghost deployments using affected versions of the bundled image-processing functionality for bookmark cards. It may be present when a staff user can create a bookmark card for an external site and the server processes attacker-controlled SVG content obtained through that workflow.

Exploit preconditions

  • Attack surface: Ghost bookmark-card creation and server-side image processing
  • Required access: An authenticated staff account, including a Contributor-level account
  • Trigger point: Processing of SVG content associated with an attacker-controlled website
  • Why exploitation is possible: Vulnerable SVG handling permits crafted content to cross

into command-execution behavior during server-side processing

  • Attack surface: Ghost bookmark-card creation and server-side image processing
  • Required access: An authenticated staff account, including a Contributor-level account
  • Trigger point: Processing of SVG content associated with an attacker-controlled website
  • Why exploitation is possible: Vulnerable SVG handling permits crafted content to cross

into command-execution behavior during server-side processing

Why this happens

The underlying issue is an unsafe interpretation of attacker-controlled SVG data by the image-processing component. Instead of treating SVG as inert document content subject to strict sanitization, the processing path allows embedded or interpreted constructs to influence server-side execution. This behavior maps to CWE-94, Improper Control of Generation of Code, because untrusted input can affect executable behavior.

The underlying issue is an unsafe interpretation of attacker-controlled SVG data by the image-processing component. Instead of treating SVG as inert document content subject to strict sanitization, the processing path allows embedded or interpreted constructs to influence server-side execution. This behavior maps to CWE-94, Improper Control of Generation of Code, because untrusted input can affect executable behavior.

Potential impact

  • An attacker may execute arbitrary commands with the privileges of the Ghost process.
  • The Ghost server could be compromised or used to access connected services.
  • Content, credentials, or other server-side data could be exposed or modified.
  • An attacker could use the compromised instance for persistence, lateral movement, or

further abuse.

  • An attacker may execute arbitrary commands with the privileges of the Ghost process.
  • The Ghost server could be compromised or used to access connected services.
  • Content, credentials, or other server-side data could be exposed or modified.
  • An attacker could use the compromised instance for persistence, lateral movement, or

further abuse.

General mitigation guidance

Mitigation generally focuses on removing executable interpretation from SVG processing

and reducing trust in externally sourced bookmark content.

Common defensive patterns include:

  • Use SVG sanitization and image-processing modes that do not interpret scripts or

executable constructs.

  • Prefer secure-by-default rasterization or narrowly supported image formats where SVG

features are unnecessary.

  • Validate and constrain remote bookmark metadata and fetched content before processing.
  • Run image-processing workers with least privilege, restricted filesystem access, and

limited network permissions.

  • Isolate media processing from core application services and protect server-side secrets.
  • Apply dependency governance and security review to bundled parsing and image libraries.

Mitigation generally focuses on removing executable interpretation from SVG processing

and reducing trust in externally sourced bookmark content.

Common defensive patterns include:

  • Use SVG sanitization and image-processing modes that do not interpret scripts or

executable constructs.

  • Prefer secure-by-default rasterization or narrowly supported image formats where SVG

features are unnecessary.

  • Validate and constrain remote bookmark metadata and fetched content before processing.
  • Run image-processing workers with least privilege, restricted filesystem access, and

limited network permissions.

  • Isolate media processing from core application services and protect server-side secrets.
  • Apply dependency governance and security review to bundled parsing and image libraries.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and dependency review for SVG parsers or image libraries that enable

scripting, external references, or command execution.

  • Code review signals such as processing remote content without sanitization or invoking

native image tools with untrusted filenames and data.

  • Tests that submit hostile SVG structures and verify that processing remains data-only.
  • Runtime monitoring for unexpected child processes, shell activity, outbound connections,

or file changes from Ghost workers.

  • Policy enforcement requiring approved media formats, isolated processing, and dependency

vulnerability checks. Automated review tools may help identify unsafe parser patterns.

Organizations can look for this class of issue through:

  • Static analysis and dependency review for SVG parsers or image libraries that enable

scripting, external references, or command execution.

  • Code review signals such as processing remote content without sanitization or invoking

native image tools with untrusted filenames and data.

  • Tests that submit hostile SVG structures and verify that processing remains data-only.
  • Runtime monitoring for unexpected child processes, shell activity, outbound connections,

or file changes from Ghost workers.

  • Policy enforcement requiring approved media formats, isolated processing, and dependency

vulnerability checks. Automated review tools may help identify unsafe parser patterns.

Sources

SourceLink
github.comgithub.com/TryGhost/Ghost/security/advisories/GHSA-788w-68h3-cvxp

Frequently asked

questions

An authenticated staff user who can create bookmark cards may be able to trigger the

vulnerable processing path, including users with Contributor-level access.

No. The relevant access is authenticated Ghost content-management access; exploitation

depends on the server fetching or processing attacker-controlled bookmark content.

Treat remote SVG data as untrusted, sanitize it with a restrictive allowlist, and use

processing paths that cannot interpret scripts or generate commands.

Isolate media-processing components, minimize their privileges and network access, review

SVG and image dependencies, and monitor for unexpected process execution by application

workers.

An authenticated staff user who can create bookmark cards may be able to trigger the

vulnerable processing path, including users with Contributor-level access.

No. The relevant access is authenticated Ghost content-management access; exploitation

depends on the server fetching or processing attacker-controlled bookmark content.

Treat remote SVG data as untrusted, sanitize it with a restrictive allowlist, and use

processing paths that cannot interpret scripts or generate commands.

Isolate media-processing components, minimize their privileges and network access, review

SVG and image dependencies, and monitor for unexpected process execution by application

workers.

Find out what's already
exploitable in your codebase.