Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-h5jc-78hr-3pc9

GHSA-h5jc-78hr-3pc9 is a security vulnerability in @sveltia/cms. O3 Security confirms whether GHSA-h5jc-78hr-3pc9 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Sveltia CMS: Stored XSS in Markdown/RichText preview via unsandboxed same-origin iframe

Published
Jun 19, 2026
Updated
Jun 19, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

Blast Radius

1 pkg affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

@sveltia/cmsnpm
9Kdownloads / week

Description

Impact

A stored cross-site scripting (XSS) vulnerability affected the Markdown/RichText field preview renderer in Sveltia CMS.

The DOMPurify sanitization configuration used for Markdown previews explicitly permitted iframe elements without enforcing a sandbox attribute or restricting iframe sources. Sanitized Markdown output was then inserted into the CMS preview DOM as raw HTML. Because no sandboxing or source validation was applied, a Markdown field containing an iframe whose src pointed to a same-origin uploaded or publicly accessible HTML asset would render an unsandboxed iframe. JavaScript in the framed document could then access the parent CMS window via the browser’s same-origin policy, allowing it to read and write the parent window’s state, DOM, and browser storage, and to trigger actions in the CMS context.

The practical impact is limited in currently supported Sveltia CMS usage because the CMS is intended for a single developer or a small trusted team, and open authoring / untrusted multi-user authoring is not currently implemented. Exploitation requires the ability to place malicious content into the repository or content source that the CMS loads.

Patches

The issue has been patched by replacing the direct DOMPurify call in the Markdown preview renderer with a two-pass sanitization pipeline:

  1. DOMPurify processes the raw HTML as before.
  2. A post-processing step validates every iframe element in the sanitized output. Any iframe whose src does not use an https:// URL, uses a same-origin URL, uses a relative path, or uses any other non-HTTPS scheme (javascript:, data:, blob:, , etc.) is removed from the output. Surviving iframes (HTTPS cross-origin only) have a sandbox attribute enforced with at minimum allow-scripts allow-same-origin, which confines the framed document to its own origin and prevents it from accessing the parent CMS window.

Users should upgrade to Sveltia CMS v0.167.3 or later.

Workarounds

If upgrading is not immediately possible, avoid loading CMS content from untrusted authors and review Markdown field content for iframe elements pointing to same-origin or relative paths.

Administrators can also reduce exposure by limiting repository or content source write access to trusted users only.

References

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@sveltia/cmsall versions0.167.3

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @sveltia/cms. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @sveltia/cms to 0.167.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-h5jc-78hr-3pc9 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-h5jc-78hr-3pc9 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-h5jc-78hr-3pc9. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact A stored cross-site scripting (XSS) vulnerability affected the Markdown/RichText field preview renderer in Sveltia CMS. The DOMPurify sanitization configuration used for Markdown previews explicitly permitted `iframe` elements without enforcing a `sandbox` attribute or restricting iframe sources. Sanitized Markdown output was then inserted into the CMS preview DOM as raw HTML. Because no sandboxing or source validation was applied, a Markdown field containing an `iframe` whose src pointed to a same-origin uploaded or publicly accessible HTML asset would render an unsandboxed ifram
O3 Security · Impact-Aware SCA

Is GHSA-h5jc-78hr-3pc9 in your dependencies?

O3 detects GHSA-h5jc-78hr-3pc9 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.