### Version 3.0.6 ### Reproduction link [https://codesandbox.io/s/wq6llvoxr7?fontsize=14](https://codesandbox.io/s/wq6llvoxr7?fontsize=14) ### Steps to reproduce 1. Config a simple router. (this step can be finished by using vue-cli, can quickly create a project with vue-router) ```javascript router = [ { path: '/', component: 'home' }, { path: '*', component: '404' }, ] ``` 2. Using follow url in browser address bar. `http://localhost:3000/a'a'b"c>%3f>%25%7D%7D%25%25>c<[[%3f$%7B%7B%25%7D%7Dcake//property` ### What is expected? 1. In SPA, it should match 404 page which I configured. 2. In SSR mode, it also should return the correct matched info. ### What is actually happening? 1. In SPA, got js error and blocked app. 2. In SSR mode, can only handle error, can't render correct page. --- This url will cause SSR can't render correct asterisk matched page. <!-- generated by vue-issues. DO NOT REMOVE -->