-
Notifications
You must be signed in to change notification settings - Fork 42
chore(deps): update dependency nuxt to v3.16.0 [security] #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
renovate
wants to merge
1
commit into
main
Choose a base branch
from
renovate/npm-nuxt-vulnerability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
7a2bdac to
9c2d1bb
Compare
f50fc4b to
7f0d096
Compare
7f0d096 to
4d4b067
Compare
4d4b067 to
f45561f
Compare
f45561f to
8544f46
Compare
8544f46 to
2166d0d
Compare
2166d0d to
4ec4b05
Compare
4ec4b05 to
5372bb5
Compare
5372bb5 to
e694f21
Compare
e694f21 to
a82fca7
Compare
a82fca7 to
70f4043
Compare
70f4043 to
6d34ef8
Compare
6d34ef8 to
7c5b824
Compare
7c5b824 to
594c250
Compare
594c250 to
5d6de29
Compare
5d6de29 to
3cddfc5
Compare
3cddfc5 to
4399d78
Compare
4399d78 to
e0eaab5
Compare
e0eaab5 to
9750c4b
Compare
9750c4b to
a05558d
Compare
a05558d to
d6a3937
Compare
d6a3937 to
a53d50f
Compare
a53d50f to
d137ad5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
3.7.4->3.16.03.8.1->3.16.0GitHub Vulnerability Alerts
CVE-2025-27415
Summary
By sending a crafted HTTP request to a server behind an CDN, it is possible in some circumstances to poison the CDN cache and highly impacts the availability of a site.
It is possible to craft a request, such as
https://mysite.com/?/_payload.jsonwhich will be rendered as JSON. If the CDN in front of a Nuxt site ignores the query string when determining whether to cache a route, then this JSON response could be served to future visitors to the site.Impact
An attacker can perform this attack to a vulnerable site in order to make a site unavailable indefinitely. It is also possible in the case where the cache will be reset to make a small script to send a request each X seconds (=caching duration) so that the cache is permanently poisoned making the site completely unavailable.
Conclusion :
This is similar to a vulnerability in Next.js that resulted in CVE-2024-46982 (and see this article, in particular the "Internal URL parameter and pageProps" part, the latter being very similar to the one concerning us here.)
CVE-2024-34344
Summary
Due to the insufficient validation of the
pathparameter in the NuxtTestComponentWrapper, an attacker can execute arbitrary JavaScript on the server side, which allows them to execute arbitrary commands.Details
While running the test, a special component named
NuxtTestComponentWrapperis available.https://github.com/nuxt/nuxt/blob/4779f5906fa4d3c784c2e2d6fe5a5c5f181faaec/packages/nuxt/src/app/components/nuxt-root.vue#L42-L43
This component loads the specified path as a component and renders it.
https://github.com/nuxt/nuxt/blob/4779f5906fa4d3c784c2e2d6fe5a5c5f181faaec/packages/nuxt/src/app/components/test-component-wrapper.ts#L9-L27
There is a validation for the
pathparameter to check whether the path traversal is performed, but this check is not sufficient.https://github.com/nuxt/nuxt/blob/4779f5906fa4d3c784c2e2d6fe5a5c5f181faaec/packages/nuxt/src/app/components/test-component-wrapper.ts#L15-L19
Since
import(...)usesquery.pathinstead of the normalizedpath, a non-normalized URL can reach theimport(...)function.For example, passing something like
./components/testnormalizespathto/root/directory/components/test, butimport(...)still receives./components/test.By using this behavior, it's possible to load arbitrary JavaScript by using the path like the following:
Since
resolve(...)resolves the filesystem path, not the URI, the above URI is treated as a relative path, butimport(...)sees it as an absolute URI, and loads it as a JavaScript.PoC
whoamiis written to/tmp/testDemonstration video: https://www.youtube.com/watch?v=FI6mN8WbcE4
Impact
Users who open a malicious web page in the browser while running the test locally are affected by this vulnerability, which results in the remote code execution from the malicious web page.
Since web pages can send requests to arbitrary addresses, a malicious web page can repeatedly try to exploit this vulnerability, which then triggers the exploit when the test server starts.
CVE-2024-34343
Summary
The
navigateTofunction attempts to blockthejavascript:protocol, but does not correctly use API's provided byunjs/ufo. This library also contains parsing discrepancies.Details
The function first tests to see if the specified URL has a protocol. This uses the unjs/ufo package for URL parsing. This function works effectively, and returns true for a
javascript:protocol.After this, the URL is parsed using the
parseURLfunction. This function will refuse to parse poorly formatted URLs. Parsingjavascript:alert(1)returns null/"" for all values.Next, the protocol of the URL is then checked using the
isScriptProtocolfunction. This function simply checks the input against a list of protocols, and does not perform any parsing.The combination of refusing to parse poorly formatted URLs, and not performing additional parsing means that script checks fail as no protocol can be found. Even if a protocol was identified, whitespace is not stripped in the
parseURLimplementation, bypassing theisScriptProtocolchecks.Certain special protocols are identified at the top of
parseURL. Inserting a newline or tab into this sequence will block the special protocol check, and bypass the latter checks.PoC
POC - https://stackblitz.com/edit/nuxt-xss-navigateto?file=app.vue
Attempt payload X, then attempt payload Y.
Impact
XSS, access to cookies, make requests on user's behalf.
Recommendations
As always with these bugs, the
URLconstructor provided by the browser is always the safest method of parsing a URL.Given the cross-platform requirements of nuxt/ufo a more appropriate solution is to make parsing consistent between functions, and to adapt parsing to be more consistent with the WHATWG URL specification.
Note
I've reported this vulnerability here as it is unclear if this is a bug in ufo or a misuse of the ufo library.
This ONLY has impact after SSR has occurred, the
javascript:protocol within a location header does not trigger XSS.Release Notes
nuxt/nuxt (nuxt)
v3.16.0Compare Source
👀 Highlights
There's a lot in this one!
⚡️ A New New Nuxt
Say hello to
create-nuxt, a new tool for starting Nuxt projects (big thanks to @devgar for donating the package name)!It's a streamlined version of
nuxi init- just a sixth of the size and bundled as a single file with all dependencies inlined, to get you going as fast as possible.Starting a new project is as simple as:
Special thanks to @cmang for the beautiful ASCII-art. ❤️
Want to learn more about where we're headed with the Nuxt CLI? Check out our roadmap here, including our plans for an interactive modules selector.
🚀 Unhead v2
We've upgraded to
unheadv2, the engine behind Nuxt's<head>management. This major version removes deprecations and improves how context works:If you're using Unhead directly in your app, keep in mind:
#app/composables/headinstead of@unhead/vue@unhead/vuemight lose async contextDon't worry though - we've maintained backward compatibility in Nuxt 3, so most users won't need to change anything!
If you've opted into
compatibilityVersion: 4, check out our upgrade guide for additional changes.🔧 Devtools v2 Upgrade
Nuxt Devtools has leveled up to v2 (#30889)!
You'll love the new features like custom editor selection, Discovery.js for inspecting resolved configs (perfect for debugging), the return of the schema generator, and slimmer dependencies.
One of our favorite improvements is the ability to track how modules modify your Nuxt configuration - giving you X-ray vision into what's happening under the hood.
👉 Discover all the details in the Nuxt DevTools release notes.
⚡️ Performance Improvements
We're continuing to make Nuxt faster, and there are a number of improvements in v3.16:
exsolvefor module resolution (#31124) along with the rest of the unjs ecosystem (nitro, c12, pkg-types, and more) - which dramatically speeds up module resolutionloadNuxtby skipping unnecessary resolution steps (#31176) - faster startupsoxc-parserfor parsing in Nuxt plugins (#30066)All these speed boosts happen automatically - no configuration needed!
Shout out to CodSpeed with Vitest benchmarking to measure these improvements in CI - it has been really helpful.
To add some anecdotal evidence, my personal site at roe.dev loads 32% faster with v3.16, and nuxt.com is 28% faster. I hope you see similar results! ⚡️
🕰️ Delayed Hydration Support
We're very pleased to bring you native delayed/lazy hydration support (#26468)! This lets you control exactly when components hydrate, which can improve initial load performance and time-to-interactive. We're leveraging Vue's built-in hydration strategies - check them out in the Vue docs.
You can also listen for when hydration happens with the
@hydratedevent:Learn more about lazy hydration in our components documentation.
🧩 Advanced Pages Configuration
You can now fine-tune which files Nuxt scans for pages (#31090), giving you more control over your project structure:
🔍 Enhanced Debugging
We've made debugging with the
debugoption more flexible! Now you can enable just the debug logs you need (#30578):Or keep it simple with
debug: trueto enable all these debugging features.🎨 Decorators Support
For the decorator fans out there (whoever you are!), we've added experimental support (#27672). As with all experimental features, feedback is much appreciated.
📛 Named Layer Aliases
It's been much requested, and it's here! Auto-scanned local layers (from your
~~/layersdirectory) now automatically create aliases. You can access your~~/layers/testlayer via#layers/test(#30948) - no configuration needed.If you want named aliases for other layers, you can add a name to your layer configuration:
This creates the alias
#layers/example-layerpointing to your layer - making imports cleaner and more intuitive.🧪 Error Handling Improvements
We've greatly improved error messages and source tracking (#31144):
useAsyncDatacalls with precise file location informationPlus, we're now using Nitro's beautiful error handling (powered by youch) to provide more helpful error messages in the terminal, complete with stacktrace support.
Nitro now also automatically applies source maps without requiring extra Node options, and we set appropriate security headers when rendering error pages.
📦 Module Development Improvements
For module authors, we've added the ability to augment Nitro types with
addTypeTemplate(#31079):⚙️ Nitro v2.11 Upgrade
We've upgraded to Nitro v2.11. There are so many improvements - more than I can cover in these brief release notes.
👉 Check out all the details in the Nitro v2.11.0 release notes.
📦 New
unjsMajor VersionsThis release includes several major version upgrades from the unjs ecosystem, focused on performance and smaller bundle sizes through ESM-only distributions:
✅ Upgrading
As usual, our recommendation for upgrading is to run:
This refreshes your lockfile and pulls in all the latest dependencies that Nuxt relies on, especially from the unjs ecosystem.
👉 Changelog
compare changes
🚀 Enhancements
@nuxt/devtoolsto v2 (#30889)NuxtPage(#30704)directoryToURLto normalise paths (#30986)start/setin loading indicator (#30989)pages/(#31090)NuxtLinkslot (#31104)addTypeTemplate(#31079)oxc-parserinstead of esbuild + acorn (#30066)🔥 Performance
exsolvefor module resolution (#31124)loadNuxt(#31176)🩹 Fixes
<NuxtLayout>fallbackprop is typed (#30832)keepalivecache reset (#30807)divwrapper in client-only pages (#30425)nitropack(aba75bd5a)nullfrom resolve functions (d68e8ce57)app.head.metavalues are undefined (#30959)shared/directories available within layers (#30843)<pre>when rendering dev errors (9aab69ec4)page:transition:starttype (#31040)provide/injectwork insetupofdefineNuxtComponent(#30982)_for NuxtIsland name on server pages (#31072)ohashto calculate legacy async data key without hash (#31087)shareddir from config (#31091)nuxt.options.pagesto detected configuration (#31101)definePageMetadoes not receive an object (#31156)no-ssrmiddleware handler (a99c59fbd)navigatewithvue-router(7a1934509)nuxt.options.pages(fa480e0a0)resolveModule(6fb5c9c15)resolveTypePath(a0f9ddfe2)compilerOptions.paths(835e89404)RawVueCompilerOptionsfor unresolvedtsconfig(#31202)navigateTowith replace (#31244)devStorage(#31233)useFetchfunction name on server for warning (#31213)x-nitro-prerenderheader (2476cab9a)💅 Refactors
isEqualfromohash/utils(2e27cd30c)noScriptsroute rule (#31083)runtime/nitrofiles (#31131)📖 Documentation
spaLoadingTemplateexample (#30830)NuxtPage(#30781)navigateTodocs with clearer structure and examples (#30876)rootDir(27e356fe6)vue:setupandapp:data:refreshhooks (#31001)defineNuxtRouteMiddleware(#31005)portoption to preview command (#30999).nuxtrcdocumentation (#31093)$fetchon the server (#31114)create nuxtcommand (fe82af4c9)3x(a243f8fcf)<NuxtPage>during page changes (#31116)typedPagesin unhoisted pnpm setups (#31262)📦 Build
🏡 Chore
errxdependency (566418177)@nuxtjs/mdctypechecking dep (f23683b26)nitro/renderertemplates (b29c0e86b)✅ Tests
#internal/nitro/app(a1b855cc5)❤️ Contributors
v3.15.4Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🩹 Fixes
acorn(#30754)@nuxt/schemafromnuxtpackage dir (#30774)srcDir(#30771)useRoutein SFC setup (#30788)externalityfor dev server externals (#30802)💅 Refactors
chunk.namesfor asset names (#30780)❤️ Contributors
v3.15.3Compare Source
👀 Highlights
CORS configuration for dev server
Alongside a range of improvements, we've also shipped a significant fix to impose CORS origin restrictions on the dev server. This applies to your Vite or Webpack/Rspack dev middleware only.
This is a significant/breaking change we would not normally ship in a patch but it is a security fix (see GHSA-4gf7-ff8x-hq99 and GHSA-2452-6xj8-jh47) and we urge you to update ASAP.
You can configure the allowed origins and other CORS options via the
devServer.corsoptions in yournuxt.config, which may be relevant if you are developing with a custom hostname:✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🔥 Performance
mkdirSynccalls (#30651)findPathandresolvePath(#30682)Transitioncomponent only on client side (#30720)🩹 Fixes
#app-manifestalias (#30618)plugin.srcfor variable name generation (#30649)dev/testenvironment value (#30667)invalidateModulecall (9bd71e498)[[optional dynamic params (#30619)devServer.cors(406db5b4d)💅 Refactors
externalityand use vite internal config (#30634)📖 Documentation
useFetchexample (#30629)nuxisource code (4fabe0025)NuxtLink(#30614)addRouteMiddleware(#30656)ClientOnlywithonMountedhook (#30670)navigationmode incallOncecomposable (#30612)📦 Build
inlineDependenciesoption (01adefcec)🏡 Chore
lodash-es(0c01273f5)🤖 CI
❤️ Contributors
v3.15.2Compare Source
👀 Highlights
🔥 Startup performance improvements
It is worth noting that this release includes some pretty significant performance improvements which you should notice particularly in the startup time. In my tests in the nuxt monorepo,
There's more improvement to do here but hopefully these are good numbers!
📦 CLI refactor
To improve performance within Nuxt projects, we've published a new
@nuxt/clidistribution ofnuxi, which is used under-the-hood innuxt(see issue). This should behave exactly the same and nothing needs to be updated in your projects (for example, you will continue to use thenuxiornuxtcommands). The only significant change is that it no longer inlines dependencies. Feedback is welcome 🙏✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🔥 Performance
@nuxt/clidependency (#30526)🩹 Fixes
definePageMetawhen extracting page metadata (#30490)#buildto the end oftsConfigpaths (#30520)fullPathinstead of empty string in router hmr (#30500)@nuxt/cli(618bbc6da)page:loading:endonly once with nested pages (#29009)#app-manifest(#30587)shouldPrefetchon the server side (#30591)💅 Refactors
📖 Documentation
--devoption for the module command (#30477)urlinuseFetch(#30531)@nuxt/module-buildersource (509cf4a5c)statusdetail and enhancegetCachedDatareadability (#30536)useNuxtData(#30570)useAsyncDataside effects (#30479)🏡 Chore
nuxt/app(1adf3e31f)🤖 CI
❤️ Contributors
v3.15.1Compare Source
✅ Upgrading
As usual, our recommendation for upgrading is to run:
This will refresh your lockfile as well, and ensures that you pull in updates from other dependencies that Nuxt relies on, particularly in the unjs ecosystem.
👉 Changelog
compare changes
🔥 Performance
lodash-esdependency (#30409)pathebrowser dep for deep server components (#30456)🩹 Fixes
nuxtinstance toresolvePagesRoutes(e4a372e12)locationinstead ofrangefor route meta property extraction (#30447)vueCompilerOptions.pluginstype (#30454)baseURLwhen ignoring prerendered manifest (#30446)router.optionswhen hmring routes (#30455)💅 Refactors
consolawithnuxttag instead of console (#30408)📖 Documentation
lodashand recommendes-toolkit(8e2ca5bdc)🏡 Chore
❤️ Contributors
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.