/

CVE-2026-103292

Severity:

HIGH RISK

(8.0)

Stored XSS (CWE-79) in Ghost JSON-LD Head Helper Output

CVE-2026-103292

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Script execution in a victim's browser and potential administrative session compromise

Severity:

HIGH RISK

(8.0)

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

Ghost does not properly sanitize data inserted into the JSON-LD HTML output generated by the {{ghost_head}} helper. An authenticated user with limited privileges may inject content that executes as script when a published page is viewed, potentially compromising a staff user's administrative session.

Affected context

The vulnerability affects Ghost installations using vulnerable versions of the {{ghost_head}} helper to emit JSON-LD content. It becomes risky when a limited-privilege authenticated user can place controllable data into content or metadata that is later rendered on a published page without adequate output encoding.

Exploit preconditions

  • Attack surface: Published Ghost pages containing JSON-LD output generated by the {{ghost_head}} helper
  • Required access: An authenticated account with permissions to influence the relevant content or metadata
  • Trigger point: A staff user or other privileged visitor views the affected published page
  • Why exploitation is possible: User-controlled data is emitted into an HTML script context without sufficient sanitization or context-aware encoding

Why this happens

The underlying flaw is improper neutralization of user-controlled data before it is placed into an HTML script element. JSON-LD content must be safely serialized and encoded for its surrounding HTML context; otherwise, attacker-controlled values can alter the interpreted markup or script content. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation, commonly known as cross-site scripting.

Potential impact

  • Arbitrary script execution in a staff user's browser
  • Theft or misuse of accessible session information
  • Unauthorized actions performed through a compromised administrative session
  • Modification of site content or configuration
  • Exposure of data available to the affected staff user

General mitigation guidance

Mitigation generally focuses on ensuring that all data placed in JSON-LD and other HTML script contexts is serialized and encoded using context-appropriate, secure-by-default mechanisms.

Common defensive patterns include:

  • Applying strict output encoding at the point where data enters the HTML context
  • Using well-maintained serializers that safely emit JSON-LD for HTML embedding
  • Reducing trust in metadata and content supplied by lower-privilege users
  • Enforcing least privilege for accounts that can modify published content or metadata
  • Applying a restrictive Content Security Policy where practical as defense in depth
  • Validating rendered output through security-focused automated and manual testing

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying unescaped values in HTML or script contexts
  • Code review checks for JSON serialization followed by unsafe HTML interpolation
  • Tests that place representative special characters in user-controlled metadata and inspect rendered pages
  • Content security policy reports indicating unexpected script execution or violations
  • Policy enforcement requiring context-aware output encoding for all templated HTML
  • Automated security review tools that flag stored cross-site scripting patterns

Sources

SourceLink
github.comgithub.com/TryGhost/Ghost/security/advisories/GHSA-mp9q-4q6m-44f5
vulncheck.comvulncheck.com/advisories/ghost-0.5.3-before-6.50.0-cross-site-scripting-via-ghost-head

Frequently asked

questions

It can be triggered through a published page, but exploitation generally depends on an authenticated user being able to influence the affected data and a staff user viewing the resulting page.

The described scenario requires an authenticated account with limited privileges that can modify content or metadata ultimately rendered by the vulnerable helper.

Use secure, context-aware serialization and output encoding for JSON-LD embedded in HTML, while ensuring untrusted values cannot change the surrounding script context.

Apply least privilege, review all template output boundaries, test rendered content with adversarial input, and enforce automated checks for unsafe HTML or script-context interpolation.

Find out what's already
exploitable in your codebase.