npm package report

Is @quasar/render-ssr-error safe?

1 known vulnerability, worst severity HIGH.

// reach

0 direct dependencies

none carry a known advisory

    0 packages depend on it

    an advisory here reaches each of them

      Create a free accountfor every dependency path, dependent and what to upgrade
      // ai model usage

      Tracked for PyPI packages. HuggingFace models declare Python dependencies, so npm packages are not covered.


      cvss
      0.0
      high

      severity out of 10

      epss
      not scored

      chance of exploitation in 30 days

      xyz score
      not scored

      CyberXYZ composite out of 10

      fig. 01 — GHSA-r5mf-4r5x-q78f, the advisory selected below

      // 1 advisories

      GHSA-r5mf-4r5x-q78f

      HIGHCVE-2026-106106
      // 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(`</${tagName}`, 'gi'), `<\\/${tagName}`)
      }
      // poc

      Harness that replicates the dev server's error branch using the published @quasar/render-ssr-error@2.2.3, with two canary values planted in the environment:

      import http from 'node:http'
      import renderSSRError from '@quasar/render-ssr-error'
      
      process.env.AWS_SECRET_ACCESS_KEY = 'CANARY_AWS_SECRET_dev_machine_9f3a1c'
      process.env.NPM_TOKEN = 'CANARY_npm_TOKEN_abcdef'
      
      http.createServer((req, res) => {
        const err = new Error('Cannot read properties of undefined (reading "x")')
        const { errorHeaders, errorHtml } = renderSSRError({ err, req, rootFolder: process.cwd() })
        res.writeHead(500, errorHeaders)
        res.end(errorHtml)
      }).listen(3200, '0.0.0.0')

      Disclosure needs no payload at all. A plain GET / returns a 957 KB page containing both canaries:

      ENV DISCLOSURE (plain GET, no injection): 2/2 canary secrets present in the 500 page
        -> CANARY_AWS_SECRET_dev_machine_9f3a1c, CANARY_npm_TOKEN_abcdef

      For the injection, the payload goes in an ordinary request header. JSON.stringify escapes " as \", so the handler uses single quotes:

      Loaded in headless Chromium:

      POSITIVE    (uppercase + space)   window.__QPWN=127.0.0.1:3200  injectedImg=1  ATTACKER SCRIPT EXECUTED
      POSITIVE    (lowercase + space)   window.__QPWN=127.0.0.1:3200  injectedImg=1  ATTACKER SCRIPT EXECUTED
      POSITIVE    (lowercase + slash)   window.__QPWN=127.0.0.1:3200  injectedImg=1  ATTACKER SCRIPT EXECUTED
      POSITIVE     (mixed case)          window.__QPWN=127.0.0.1:3200  injectedImg=1  ATTACKER SCRIPT EXECUTED
      NEG-CTRL     (what the filter matches)
                                                  window.__QPWN=null            injectedImg=0  no execution

      The negative control is the same payload with the one spelling replaceAll actually matches. Nothing is injected and nothing runs, which isolates the bug to the escape rather than to the surrounding page. Confirming the injection context, a probe header comes back inside the single element:

      ..."Headers":{"host":"127.0.0.1:3200","user-agent":"curl/8.18.0","accept":"*/*",
         "x-probe":"MARKEREND"},...

      No Content-Security-Policy is sent with the page.

      // impact

      Exposure of sensitive system information, plus HTML injection into a page that carries it. This is development only, since serve.devError does not exist in a production build, and it requires the app's SSR render to throw. That is the routine state this page exists to display, and an attacker who can reach the port can simply poll for it.

      The disclosure is the substantive half and needs nothing but a TCP connection: shell environment, all request headers, all cookies, and ten lines of source around every stack frame. On a developer machine that typically means cloud credentials, npm or GitHub tokens and database connection strings. Because Quasar overrides Vite's localhost default with 0.0.0.0, everyone on the same network segment or in a shared container network can ask for it.

      The injection is best treated as a chained issue on top of that rather than as a drive-by. A raw HTTP client can set the header but only poisons its own page. For the code to run in the developer's browser the payload has to travel with the developer's own request, which in practice means the cookie channel, since cookie values are URL-decoded and any page on a localhost or 127.0.0.1 origin can set a cookie that is sent to every port on that host. Cross-origin fetch does not work: CORS-safelisted headers forbid , and browsers percent-encode them in the URL while req.url is never decoded.

      Fixing the escape alone leaves the disclosure. Serializing with something that escapes <, such as the serialize-javascript already used correctly in app-vite/lib/modes/ssr/ssr-utils.js, closes the injection; redacting or omitting process.env and cookie values closes the disclosure; defaulting devServer.host to localhost as Vite does would reduce who can ask.

      // cvss v4.0 vector

      CVSS:4.0/AV:A/AC:H/AT:P/PR:N/UI:P/VC:H/VI:L/VA:N/SC:H/SI:H/SA:N

      Attack vector
      Adjacent
      Attack complexity
      High
      Attack requirements
      Present
      Privileges required
      None
      User interaction
      Passive
      Confidentiality (vulnerable system)
      High
      Integrity (vulnerable system)
      Low
      Availability (vulnerable system)
      None
      Confidentiality (subsequent systems)
      High
      Integrity (subsequent systems)
      High
      Availability (subsequent systems)
      None

      Checked 2026-10-07 at 18:29 UTC. The most recent advisory here was published 2026-10-07. Updated continuously from NVD, GHSA, OSV and CNA feeds.

      Think a verdict here is wrong? Tell us — we respond within 2 business days.