VulnWatch VulnWatch
← Back to dashboard
High github · GHSA-r5mf-4r5x-q78f

Quasar Framework: SSR/SSG dev error page discloses the full shell environment and its </script> escape is bypassable

Published Oct 7, 2026 CVSS 0.0

Summary

The error page that Quasar CLI shows when an SSR or SSG render throws in development serializes every variable in process.env, every request header and every cookie into the HTTP response, and the dev server binds 0.0.0.0 by default. Any host that can reach the port therefore gets the developer's cloud keys, registry tokens and database URLs from a single unauthenticated GET. The same page embeds that data inside a element behind a `replaceAll('', ...)` guard that is ASCII-case-sensitive and requires a literal `>`, so, and all escape the element and give script execution in the dev server's origin.

Details

renderSSRError() builds the page by splicing a JSON blob into a prebuilt bundle (utils/render-ssr-error/src/index.js):

errorHtml:
  before +
  JSON.stringify(data).replaceAll('', String.raw``) +
  after

before and after are the two halves of the compiled error-page UI, split inside a `` element, so data is emitted as a JS object literal in raw script text. The data itself comes from utils/render-ssr-error/src/env.js:

function getEnvironmentVariablesData () {
  return Object.keys(process.env).reduce((acc, name) => {
    acc[ name ] = process.env[ name ]
    return acc
  }, {})
}

export function getEnv (req) {
  return {
    Request: getRequestData(req),
    Headers: getHeadersData(req),
    Cookies: getCookiesData(req),
    'Shell environment variables': getEnvironmentVariablesData()
  }
}

The page is served by serve.devError({ err, req }) in app-vite/lib/modes/ssr/ssr-devserver.js and by the SSG equivalent, which the generated render middleware calls on any render exception. The dev server listens on every interface because app-vite/lib/quasar-config-file.js overrides Vite's localhost default:

} else if (!cfg.devServer.host) {
  cfg.devServer.host = '0.0.0.0'
}

The escape fails because the HTML tokenizer ends script raw text on . `replaceAll` with a string pattern matches one exact spelling. , , and are all untouched and all close the element. `JSON.stringify` does not escape, and cookie values are additionally run through decodeURIComponent before being placed in the blob, so percent-encoded payloads decode into working markup.

The project already implements this correctly elsewhere. ui/src/plugins/meta/Meta.js uses a case-insensitive pattern with no trailing >:

function protectRawText (value, tagName) {
  return String(value).replaceAll(new RegExp(`

Affected AI Products

replicate
Get the weekly digest. Every Monday: top AI security stories of the week. Free.
escape is bypassable", "description": "Summary\nThe error page that Quasar CLI shows when an SSR or SSG render throws in development serializes every variable in process.env, every request header and every cookie into the HTTP response, and...", "datePublished": "2026-10-07T16:16:12+00:00", "dateModified": "2026-10-08T01:00:04+00:00", "mainEntityOfPage": "https://vulnwatch.ai/entry/01a11906-4670-7036-bbd9-323456419384", "image": "https://vulnwatch.ai/vulnwatch.png", "keywords": [ "replicate", "GHSA-r5mf-4r5x-q78f" ], "author": { "@type": "Organization", "name": "VulnWatch" }, "publisher": { "@type": "Organization", "name": "VulnWatch", "logo": { "@type": "ImageObject", "url": "https://vulnwatch.ai/vulnwatch.png" } } }