Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @sveltia/cms
  4. ›
  5. GHSA-h5jc-78hr-3pc9

GHSA-h5jc-78hr-3pc9: Sveltia CMS: Stored XSS in Markdown/RichText preview via unsandboxed same-origin iframe

June 19, 2026

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.

References

  • github.com/advisories/GHSA-h5jc-78hr-3pc9
  • github.com/sveltia/sveltia-cms/commit/8c46294eadf52a8ac48740ccb5054b99d65cff1b
  • github.com/sveltia/sveltia-cms/releases/tag/v0.167.3
  • github.com/sveltia/sveltia-cms/security/advisories/GHSA-h5jc-78hr-3pc9

Code Behaviors & Features

Detect and mitigate GHSA-h5jc-78hr-3pc9 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.167.3

Fixed versions

  • 0.167.3

Solution

Upgrade to version 0.167.3 or above.

Impact 4.6 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

npm/@sveltia/cms/GHSA-h5jc-78hr-3pc9.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:23:22 +0000.