Cross-site Scripting (XSS) Affecting vite package, versions <8.0.11-r0


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.03% (10th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Scripting (XSS) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-CHAINGUARDLATEST-VITE-16534841
  • published8 May 2026
  • disclosed24 Apr 2026

Introduced: 24 Apr 2026

NewCVE-2026-41305  (opens in a new tab)
CWE-79  (opens in a new tab)

How to fix?

Upgrade Chainguard vite to version 8.0.11-r0 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream vite package and not the vite package as distributed by Chainguard. See How to fix? for Chainguard relevant fixed versions and status.

PostCSS takes a CSS file and provides an API to analyze and modify its rules by transforming the rules into an Abstract Syntax Tree. Versions prior to 8.5.10 do not escape &lt;/style&gt; sequences when stringifying CSS ASTs. When user-submitted CSS is parsed and re-stringified for embedding in HTML &lt;style&gt; tags, &lt;/style&gt; in CSS values breaks out of the style context, enabling XSS. Version 8.5.10 fixes the issue.

CVSS Base Scores

version 3.1