Summary
Ghost embed cards could bypass protections against stored cross-site scripting, allowing a staff user to save script content in a post. When another staff user opened that post in the editor, the script could execute in their administrative session.
Ghost embed cards could bypass protections against stored cross-site scripting, allowing a staff user to save script content in a post. When another staff user opened that post in the editor, the script could execute in their administrative session.
Affected context
The issue affects Ghost sites using vulnerable 6.34.0 through 6.66.x releases where embed cards are processed in the editor. It becomes risky when a staff account can create or modify post content and another privileged staff member later opens that content in the administrative editor. The related security.embedPreviewUrl configuration should remain at its secure default on self-hosted deployments.
The issue affects Ghost sites using vulnerable 6.34.0 through 6.66.x releases where embed cards are processed in the editor. It becomes risky when a staff account can create or modify post content and another privileged staff member later opens that content in the administrative editor. The related security.embedPreviewUrl configuration should remain at its secure default on self-hosted deployments.
Exploit preconditions
- Attack surface: Ghost administrative editor and embed-card content handling
- Required access: A staff account with permission to create or modify posts; Contributors may be sufficient
- Trigger point: Another staff user opens the affected post in the editor
- Why exploitation is possible: Embed-card content is stored and later rendered in a privileged editor context without reliably neutralizing executable script content
- Attack surface: Ghost administrative editor and embed-card content handling
- Required access: A staff account with permission to create or modify posts; Contributors may be sufficient
- Trigger point: Another staff user opens the affected post in the editor
- Why exploitation is possible: Embed-card content is stored and later rendered in a privileged editor context without reliably neutralizing executable script content
Why this happens
The underlying bug is insufficient output encoding or sanitization of stored embed-card content before it is rendered in the Ghost editor. This permits attacker-controlled markup or script content to persist in a post and execute when viewed by another staff member. The behavior maps primarily to CWE-79, Improper Neutralization of Input During Web Page Generation, with CWE-653 reflecting a violation of the intended separation between content and the privileged administrative execution context.
The underlying bug is insufficient output encoding or sanitization of stored embed-card content before it is rendered in the Ghost editor. This permits attacker-controlled markup or script content to persist in a post and execute when viewed by another staff member. The behavior maps primarily to CWE-79, Improper Neutralization of Input During Web Page Generation, with CWE-653 reflecting a violation of the intended separation between content and the privileged administrative execution context.
Potential impact
- An attacker may execute script in another staff user's administrative session
- The script could perform actions available to the affected staff account
- Administrative tokens or session information could be exposed depending on browser and application controls
- Content, users, settings, or other site data could be modified or accessed
- An attacker may execute script in another staff user's administrative session
- The script could perform actions available to the affected staff account
- Administrative tokens or session information could be exposed depending on browser and application controls
- Content, users, settings, or other site data could be modified or accessed
General mitigation guidance
Mitigation generally focuses on ensuring that untrusted embed content cannot
execute in privileged editor contexts.
Common defensive patterns include:
- Applying context-appropriate output encoding and robust allowlist-based sanitization
- Treating all staff-authored embed content as untrusted
- Isolating previews in restrictive sandboxed contexts with minimal privileges
- Keeping security.embedPreviewUrl at its secure default unless a reviewed deployment requirement exists
- Limiting staff permissions according to least privilege
- Using strong session protections and restrictive content security policies
- Maintaining supported Ghost releases through the normal patch-management process
Mitigation generally focuses on ensuring that untrusted embed content cannot
execute in privileged editor contexts.
Common defensive patterns include:
- Applying context-appropriate output encoding and robust allowlist-based sanitization
- Treating all staff-authored embed content as untrusted
- Isolating previews in restrictive sandboxed contexts with minimal privileges
- Keeping security.embedPreviewUrl at its secure default unless a reviewed deployment requirement exists
- Limiting staff permissions according to least privilege
- Using strong session protections and restrictive content security policies
- Maintaining supported Ghost releases through the normal patch-management process
How teams detect issues like this
Organizations can look for stored-XSS risks through:
- Static analysis and code review of embed rendering, URL handling, and HTML insertion paths
- Signals such as direct DOM insertion, unsafe template rendering, or sanitization performed after content reaches a privileged context
- Tests that render untrusted embed content in the editor and verify that scripts cannot execute
- Monitoring for unexpected script-like markup in stored post content and unusual administrative actions after content review
- Policy enforcement requiring approved sanitization libraries and security review for preview or embed features
Automated code-scanning and dependency-review tools may help identify related patterns, but should complement contextual testing.
Organizations can look for stored-XSS risks through:
- Static analysis and code review of embed rendering, URL handling, and HTML insertion paths
- Signals such as direct DOM insertion, unsafe template rendering, or sanitization performed after content reaches a privileged context
- Tests that render untrusted embed content in the editor and verify that scripts cannot execute
- Monitoring for unexpected script-like markup in stored post content and unusual administrative actions after content review
- Policy enforcement requiring approved sanitization libraries and security review for preview or embed features
Automated code-scanning and dependency-review tools may help identify related patterns, but should complement contextual testing.

