GHSA-H5JC-78HR-3PC9

GHSA-H5JC-78HR-3PC9 is a low-severity cross-site scripting (XSS) vulnerability in @sveltia/cms (npm), affecting versions < 0.167.3. It is fixed in 0.167.3.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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

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.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

Affected versions

@sveltia/cms (< 0.167.3)

Security releases

@sveltia/cms → 0.167.3 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is GHSA-H5JC-78HR-3PC9? GHSA-H5JC-78HR-3PC9 is a low-severity cross-site scripting (XSS) vulnerability in @sveltia/cms (npm), affecting versions < 0.167.3. It is fixed in 0.167.3. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. Which versions of @sveltia/cms are affected by GHSA-H5JC-78HR-3PC9? @sveltia/cms (npm) versions < 0.167.3 is affected.
  3. Is there a fix for GHSA-H5JC-78HR-3PC9? Yes. GHSA-H5JC-78HR-3PC9 is fixed in 0.167.3. Upgrade to this version or later.
  4. Is GHSA-H5JC-78HR-3PC9 exploitable, and should I be worried? Whether GHSA-H5JC-78HR-3PC9 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether GHSA-H5JC-78HR-3PC9 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix GHSA-H5JC-78HR-3PC9? Upgrade @sveltia/cms to 0.167.3 or later.

Other vulnerabilities in @sveltia/cms

Stop the waste.
Protect your environment with Kodem.