GHSA-96X6-FVHX-49HG
Vulnerability from github – Published: 2026-11-16 15:01 – Updated: 2026-11-16 15:01Summary
When a page, plugin or route middleware throws an error that is not an HTTP error, Nuxt wraps it with createError before rendering the error page. The wrapped error was treated as one the app raised deliberately, so in production its message and data were sent to the client in the error page payload (__NUXT_DATA__) and in JSON error responses. For a failed $fetch, that is the URL that was requested (including its query string) and the body of the upstream error response.
Impact
An application is affected if server-rendered code lets an error with sensitive details reach the error page, for example:
<script setup lang="ts">
const route = useRoute()
// the upstream error body, and the token in the URL, reach the client if this request fails
await $fetch(`http://users.internal/users/${route.params.id}?token=${useRuntimeConfig().usersToken}`)
</script>
Anyone who can make the request fail (for example by requesting an id the upstream service rejects) receives [GET] "http://users.internal/users/1?token=...": 502 and the upstream response body. This happens regardless of what a custom error.vue renders, because the details are part of the payload. With the default configuration, the HTTP status line is not affected.
The same applies to any other error thrown during server rendering, such as a database driver error whose message names an internal host.
Errors created deliberately with createError (or showError) are not affected: their message and data are meant for the client. Errors returned by useFetch and useAsyncData are also unchanged, as they are part of the payload by design. Server routes (server/api) are not affected.
Patches
Fixed in nuxt@4.6.4. Nuxt now marks any thrown value that is not already an HTTP error as unhandled, so the error page and JSON responses receive its status and a generic message. As a result, the error page no longer shows the message of an error thrown with throw new Error(...) in production; throw a createError with what the client may see instead.
Nuxt 3 has reached end of life and will not receive a fix. Upgrade to Nuxt 4, or apply the workaround below.
Workarounds
Catch errors from server-side requests and rethrow them with only the details the client may see:
try {
await $fetch(url)
} catch (error) {
throw createError({ statusCode: 502, statusMessage: 'Upstream request failed' })
}
Alternatively, add a Nitro plugin that hides the details of errors Nuxt wrapped. This also hides the details of a createError called with an Error (or with a cause):
// server/plugins/hide-error-details.ts
export default defineNitroPlugin((nitroApp) => {
nitroApp.hooks.hook('error', (error) => {
const cause = (error as { cause?: unknown }).cause
if (cause instanceof Error && !(cause.constructor as { __h3_error__?: boolean }).__h3_error__) {
Object.assign(error, { unhandled: true, data: undefined })
}
})
})
If secrets such as tokens in upstream URLs may have been exposed this way, rotate them.
Credits
Thanks to abhijit_dave for reporting this through the Vercel HackerOne program.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "nuxt"
},
"ranges": [
{
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "4.6.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c 4.0.0"
},
"package": {
"ecosystem": "npm",
"name": "nuxt"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-128075"
],
"database_specific": {
"cwe_ids": [
"CWE-209"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-16T15:01:26Z",
"nvd_published_at": "2026-11-13T18:17:36Z",
"severity": "MODERATE"
},
"details": "### Summary\n\nWhen a page, plugin or route middleware throws an error that is not an HTTP error, Nuxt wraps it with `createError` before rendering the error page. The wrapped error was treated as one the app raised deliberately, so in production its `message` and `data` were sent to the client in the error page payload (`__NUXT_DATA__`) and in JSON error responses. For a failed `$fetch`, that is the URL that was requested (including its query string) and the body of the upstream error response.\n\n### Impact\n\nAn application is affected if server-rendered code lets an error with sensitive details reach the error page, for example:\n\n```vue\n\u003cscript setup lang=\"ts\"\u003e\nconst route = useRoute()\n// the upstream error body, and the token in the URL, reach the client if this request fails\nawait $fetch(`http://users.internal/users/${route.params.id}?token=${useRuntimeConfig().usersToken}`)\n\u003c/script\u003e\n```\n\nAnyone who can make the request fail (for example by requesting an id the upstream service rejects) receives `[GET] \"http://users.internal/users/1?token=...\": 502` and the upstream response body. This happens regardless of what a custom `error.vue` renders, because the details are part of the payload. With the default configuration, the HTTP status line is not affected.\n\nThe same applies to any other error thrown during server rendering, such as a database driver error whose message names an internal host.\n\nErrors created deliberately with `createError` (or `showError`) are not affected: their `message` and `data` are meant for the client. Errors returned by `useFetch` and `useAsyncData` are also unchanged, as they are part of the payload by design. Server routes (`server/api`) are not affected.\n\n### Patches\n\nFixed in `nuxt@4.6.4`. Nuxt now marks any thrown value that is not already an HTTP error as `unhandled`, so the error page and JSON responses receive its status and a generic message. As a result, the error page no longer shows the message of an error thrown with `throw new Error(...)` in production; throw a `createError` with what the client may see instead.\n\nNuxt 3 has reached end of life and will not receive a fix. Upgrade to Nuxt 4, or apply the workaround below.\n\n### Workarounds\n\nCatch errors from server-side requests and rethrow them with only the details the client may see:\n\n```ts\ntry {\n await $fetch(url)\n} catch (error) {\n throw createError({ statusCode: 502, statusMessage: \u0027Upstream request failed\u0027 })\n}\n```\n\nAlternatively, add a Nitro plugin that hides the details of errors Nuxt wrapped. This also hides the details of a `createError` called with an `Error` (or with a `cause`):\n\n```ts\n// server/plugins/hide-error-details.ts\nexport default defineNitroPlugin((nitroApp) =\u003e {\n nitroApp.hooks.hook(\u0027error\u0027, (error) =\u003e {\n const cause = (error as { cause?: unknown }).cause\n if (cause instanceof Error \u0026\u0026 !(cause.constructor as { __h3_error__?: boolean }).__h3_error__) {\n Object.assign(error, { unhandled: true, data: undefined })\n }\n })\n})\n```\n\nIf secrets such as tokens in upstream URLs may have been exposed this way, rotate them.\n\n### Credits\n\nThanks to abhijit_dave for reporting this through the Vercel HackerOne program.",
"id": "GHSA-96x6-fvhx-49hg",
"modified": "2026-11-16T15:01:26Z",
"published": "2026-11-16T15:01:26Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/nuxt/nuxt/security/advisories/GHSA-96x6-fvhx-49hg"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-128075"
},
{
"type": "WEB",
"url": "https://github.com/nuxt/nuxt/commit/8c56b71e4d0377c5c047799078db09c6b3d4fde5"
},
{
"type": "PACKAGE",
"url": "https://github.com/nuxt/nuxt"
},
{
"type": "WEB",
"url": "https://github.com/nuxt/nuxt/releases/tag/v4.6.4"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Nuxt exposes the message and data of unhandled errors thrown during server rendering"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.