# CVE-2026-27119: Svelte XSS in SSR option element

Source: https://junglewise.ai/threats/cve-2026-27119-svelte-xss-in-ssr-option-element  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-19. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-27119 · Severity: medium · CVSS 4 · Published 2026-02-19

Svelte is a popular JavaScript framework used to build interactive web applications. This vulnerability allows attackers to inject malicious HTML code into server-rendered option elements, which could lead to cross-site scripting attacks and compromise of website content. Only applications using server-side rendering are affected; client-side rendering is not impacted.

Technologies: [svelte (npm)](https://junglewise.ai/threats/technologies/svelte). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is CVE-2026-27119 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-27119 being exploited in the wild.

**How severe is CVE-2026-27119?** Medium severity, with a CVSS score of 4, published 19 February 2026.

**Which products and versions are affected?** svelte (npm) SEMVER:introduced=5.39.3,fixed=5.51.5.

**Is there a fix for CVE-2026-27119?** Yes. svelte (npm): upgrade to 5.51.5 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-27119 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-27119?** Check whether you run svelte (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- svelte (npm): upgrade to 5.51.5 or later

  ```sh
  npm install svelte@5.51.5
  ```


## Technical details

This is a cross-site scripting (XSS) vulnerability (CWE-79) in Svelte's server-side rendering (SSR) implementation where the content of HTML `<option>` elements is not properly escaped. An attacker with high privileges and under specific conditions can inject unescaped HTML into the SSR output, leading to HTML injection and potential XSS attacks. The vulnerability requires network access, high attack complexity, high privileges, and attack requirements to be present. Client-side rendering is unaffected. The vulnerability was patched in version 5.51.5.

## Affected products

- Svelte Svelte 5.39.3 to 5.51.4

## Identifiers

- CVE-2026-27119
- GHSA-h7h7-mm68-gmrc

## Timeline

- 2026-02-19: disclosed
- 2026-02-19: patched: Version 5.51.5

## References

- [https://github.com/sveltejs/svelte/security/advisories/GHSA-h7h7-mm68-gmrc](https://github.com/sveltejs/svelte/security/advisories/GHSA-h7h7-mm68-gmrc)

## Related threats

- [Svelte XSS via spread attributes in SSR](https://junglewise.ai/threats/cve-2026-42599-svelte-xss-via-spread-attributes-in-ssr)
- [Svelte DOM clobbering leading to XSS in internal framework state](https://junglewise.ai/threats/cve-2026-42573-svelte-dom-clobbering-leading-to-xss-in-internal-framework-state)
- [Svelte ReDoS in svelte:element tag validation](https://junglewise.ai/threats/cve-2026-42567-svelte-redos-in-svelte-element-tag-validation)
- [Svelte XSS via insecure promise serialization in hydratable](https://junglewise.ai/threats/svelte-xss-via-insecure-promise-serialization-in-hydratable-3f504409)
- [Svelte XSS via HTML comment injection in SSR error boundary](https://junglewise.ai/threats/cve-2026-27902-svelte-xss-via-html-comment-injection-in-ssr-error-boundary)
