/

CVE-2026-103277

Severity:

HIGH RISK

(8.1)

Cross-Site Scripting (CWE-79) in Ghost oEmbed Preview

CVE-2026-103277

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79

Impact:

Administrative Session Compromise

Severity:

HIGH RISK

(8.1)

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's oEmbed preview feature may execute externally hosted scripts without sufficient sandboxing. If malicious oEmbed content is processed by a staff user, an attacker may run script in the context of that user's administrative session and potentially compromise administrative access.

Affected context

The issue may occur in Ghost deployments that enable or process the oEmbed preview feature and allow externally hosted oEmbed content to be rendered for staff users. Risk is higher when previewed content is not isolated from the administrative origin and when staff sessions provide meaningful management privileges.

Exploit preconditions

  • Attack surface: The oEmbed preview functionality in the Ghost administrative interface
  • Required access: The ability to submit, influence, or cause processing of malicious oEmbed content
  • Trigger point: Rendering the crafted preview in a staff user's authenticated administrative session
  • Why exploitation is possible: Externally hosted scripts are not sufficiently sandboxed before being executed in the administrative context

Why this happens

The vulnerability results from treating externally sourced oEmbed content as trusted active content during preview rendering. When script-capable content is inserted into a privileged administrative origin without adequate isolation, browser execution can occur within the staff user's session context. This behavior maps to CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').

Potential impact

  • An attacker may execute script in a staff user's administrative session
  • Administrative actions could be performed without the user's intended consent
  • Session-related information or sensitive page data could be exposed
  • Content, settings, or other administrative resources could be modified
  • Affected administrative access could be used for further compromise

General mitigation guidance

Mitigation generally focuses on treating external oEmbed data as untrusted and preventing it from executing in privileged browser contexts.

Common defensive patterns include:

  • Rendering previews in a strongly isolated sandbox with script execution disabled where practical
  • Applying strict allowlists for supported providers, schemes, and embedded resource types
  • Sanitizing and contextually encoding untrusted content before insertion into administrative pages
  • Enforcing restrictive Content Security Policy controls
  • Limiting administrative session privileges and separating preview rendering from sensitive application origins
  • Requiring explicit user interaction before displaying externally sourced previews

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying unsanitized oEmbed or third-party content inserted into HTML or DOM sinks
  • Code review checks for iframe, script, and preview rendering without effective sandbox or origin isolation
  • Testing with benign script markers and browser security instrumentation in controlled environments
  • Content security policy violation reporting and monitoring of unexpected administrative-origin requests
  • Policy enforcement requiring approved embed providers and secure rendering patterns

Automated security review tools may help identify common cross-site scripting and unsafe embedding patterns during development.

Sources

SourceLink
github.comgithub.com/TryGhost/Ghost/security/advisories/GHSA-8vhf-xxpj-4qrg
vulncheck.comvulncheck.com/advisories/ghost-2.5.0-before-6.34.0-untrusted-script-execution-via-oembed

Frequently asked

questions

It may be exploitable through remotely supplied or influenced oEmbed content, provided that the content is rendered by a staff user in the affected preview context.

The attacker generally needs a way to submit, control, or induce processing of oEmbed content. Direct administrative credentials may not be necessary if content can reach a staff user's preview workflow.

Treat all external oEmbed data as untrusted, sanitize it, and render it in an isolated sandbox that cannot execute scripts in the administrative origin.

Use strict provider and content allowlists, enforce contextual output encoding and Content Security Policy controls, and include security-focused tests for embedded content in administrative interfaces.

Find out what's already
exploitable in your codebase.