Skip to main content
Vulnerability Database/CVE-2026-106107

CVE-2026-106107: Quasar Framework SSR/SSG XSS Vulnerability

CVE-2026-106107 is a cross-site scripting vulnerability in Quasar Framework's SSR and SSG rendering that allows attackers to inject malicious markup. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-106107 Overview

CVE-2026-106107 is an HTML attribute injection vulnerability in the Quasar Framework, a Vue.js framework for building high-performance user interfaces. The flaw affects @quasar/app-vite server-side rendering (SSR) and static site generation (SSG) paths that interpolate ssrContext.nonce directly into quoted HTML attributes. Applications that derive or override this value with attacker-controlled data allow a quote character to terminate the nonce attribute and inject arbitrary attributes or markup into the generated HTML. The issue affects both development and production SSR/SSG output. Version 3.3.0 resolves the vulnerability. This weakness is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation).

Critical Impact

Attackers who control the nonce value can inject arbitrary HTML attributes or markup into rendered pages, enabling Cross-Site Scripting (XSS) and Content Security Policy (CSP) bypass across SSR and SSG output.

Affected Products

  • Quasar Framework @quasar/app-vite versions prior to 3.3.0
  • Applications using Quasar SSR rendering pipeline
  • Applications using Quasar SSG static generation pipeline

Discovery Timeline

  • 2026-10-06 - CVE-2026-106107 published to NVD
  • 2026-10-06 - Last updated in NVD database
  • Fixed in - @quasar/app-vite version 3.3.0

Technical Details for CVE-2026-106107

Vulnerability Analysis

The vulnerability stems from unsafe string interpolation of the ssrContext.nonce value into HTML attributes within Quasar's SSR and SSG rendering paths. The framework placed the nonce value inside quoted attributes without escaping embedded quote characters. An attacker who can influence the nonce value, such as through a reflected request parameter or an override that reads from user-controlled input, can break out of the attribute context. Breaking out of the attribute enables injection of additional attributes, event handlers, or complete HTML markup into the rendered document.

Cryptographically generated base64 or base64url nonces are not affected because the base64 alphabet does not contain HTML attribute delimiters such as " or '. The vulnerability only manifests when developers derive the nonce from attacker-controlled data instead of using a secure random generator.

Root Cause

The root cause is missing output encoding on the ssrContext.nonce value before interpolation into quoted HTML attributes. Multiple SSR and SSG code paths in @quasar/app-vite emitted the nonce directly without applying attribute-context escaping.

Attack Vector

Exploitation requires an application that assigns attacker-influenced data to ssrContext.nonce. Once such input flows into the rendering pipeline, the attacker supplies a payload containing a quote character followed by injected attributes or tags. The resulting server-rendered HTML executes the injected markup in the victim's browser, bypassing the CSP nonce protection the mechanism was intended to provide.

javascript
// Security patch excerpt - app-vite/lib/entry-files-generator.js
       'quasar-user-options.js'
     ]
 
+    if (ctx.mode.ssr || ctx.mode.ssg) {
+      regularFiles.push('ssr-nonce.js')
+    }
+
     if (ctx.mode.ssr) {
       templateFiles.push(
         'server-entry.js',

// Security patch excerpt - app-vite/lib/modes/ssr/ssr-utils.js
 import { green } from 'kolorist'
 import { normalizePath } from 'vite'
 
+export { getNonceAttr } from '../../../templates/entry/ssr-nonce.js'
+
 import { dot, info, log } from '../../utils/logger.js'

Source: Quasar GitHub Commit 91271c3. The patch centralizes nonce rendering through a getNonceAttr helper that performs attribute-safe encoding across SSR and SSG code paths.

Detection Methods for CVE-2026-106107

Indicators of Compromise

  • Server-rendered HTML containing unexpected attributes or inline event handlers inside <script nonce="..."> tags
  • Nonce attribute values that include quote characters, angle brackets, or whitespace
  • CSP violation reports referencing injected scripts that nonetheless bear a valid-looking nonce
  • Reflected content in page responses that originates from request parameters assigned to ssrContext.nonce

Detection Strategies

  • Audit application code for assignments to ssrContext.nonce that read from req.query, req.headers, cookies, or any other user-controlled source
  • Review Quasar SSR entry files for custom nonce generators that do not use crypto.randomBytes or an equivalent base64 encoder
  • Inspect rendered HTML output in staging for malformed nonce attributes using automated DOM-parsing tests
  • Scan dependency manifests for @quasar/app-vite versions below 3.3.0

Monitoring Recommendations

  • Enable CSP report-only or enforcing mode with a reporting endpoint to surface unexpected script execution
  • Log and alert on HTTP responses where SSR output contains the sequence nonce=" followed by non-base64 characters
  • Monitor web application firewall (WAF) telemetry for query parameters or headers containing quote characters routed to SSR endpoints

How to Mitigate CVE-2026-106107

Immediate Actions Required

  • Upgrade @quasar/app-vite to version 3.3.0 or later across all SSR and SSG projects
  • Audit the application for any custom code that overrides ssrContext.nonce and replace it with cryptographically random base64 values
  • Rebuild and redeploy any SSG output generated with vulnerable versions
  • Rotate any CSP policies that depended on the previously injected nonce for integrity assurance

Patch Information

The fix is available in @quasar/app-vite v3.3.0. The complete code change is documented in the upstream commit 91271c3 and the GitHub Security Advisory GHSA-5m6h-8g35-p3m7. The patch introduces a shared getNonceAttr helper that renders the nonce attribute with safe encoding.

Workarounds

  • Generate the nonce exclusively with crypto.randomBytes(16).toString('base64') or an equivalent base64url encoder so that quote characters cannot appear in the value
  • Remove any code path that derives ssrContext.nonce from HTTP request data, cookies, or external services
  • Add server-side validation to reject nonce candidates that contain characters outside the base64 alphabet
bash
# Upgrade @quasar/app-vite to the patched release
npm install @quasar/app-vite@^3.3.0

# Verify the installed version
npm ls @quasar/app-vite

# Rebuild SSR or SSG output after upgrading
quasar build -m ssr
quasar build -m ssg

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.