Static GitHub Issues

[2991] malicious file name leads to code execution

prev: 通过html行内样式css的background-image属性无法正确引用图片
next: SSR and SPA along side for different routes

Hello there,

it might be unintended, that javascript code can be injected to the generated .nuxt/router.js file by crafting a maliciously named file inside of the /pages/ dir.

For example, placing a file named ');console.log('hello') && ('.vue inside of the pages directory will lead to JS code execution both on the server and the client.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2593">#c2593</a>)</em></sub></div>