Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. svelte
  4. ›
  5. CVE-2026-27122

CVE-2026-27122: Svelte SSR does not validate dynamic element tag names in `<svelte:element>`

February 19, 2026

When using <svelte:element this={tag}> in server-side rendering, the provided tag name is not validated or sanitized before being emitted into the HTML output. If the tag string contains unexpected characters, it can result in HTML injection in the SSR output. Client-side rendering is not affected.

References

  • github.com/advisories/GHSA-m56q-vw4c-c2cp
  • github.com/sveltejs/svelte
  • github.com/sveltejs/svelte/security/advisories/GHSA-m56q-vw4c-c2cp
  • nvd.nist.gov/vuln/detail/CVE-2026-27122

Code Behaviors & Features

Detect and mitigate CVE-2026-27122 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 5.51.5

Fixed versions

  • 5.51.5

Solution

Upgrade to version 5.51.5 or above.

Impact 7.7 HIGH

CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:H/I:H/A:N

Learn more about CVSS

Weakness

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

Source file

npm/svelte/CVE-2026-27122.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Fri, 20 Feb 2026 12:19:48 +0000.