XSS in function navigateTo in nuxt/nuxt
Valid
Reported on
Jul 26th 2023
Vunerability
The check for external links checks if the protocol is script:
, which is not a valid protocol and allows the user to provide a valid
javascript payload using javascript:
protocol.
if (isExternal && parseURL(toPath).protocol === 'script:') {
throw new Error('Cannot navigate to an URL with script protocol.')
}
Proof of Concept 1
<template>
<button @click="async ()=>{
await navigateTo('javascript:alert(document.domain)', {
external: true,
})}">
Navigate</button>
</template>
Impact
Allows the injection of javascript code, which could lead to account takeover when cookies are misconfigured. User interaction is required since the user needs to actively click on the submitted link.
Occurrences
We are processing your report and will contact the
nuxt
team within 24 hours.
2 months ago
We have contacted a member of the
nuxt
team and are waiting to hear back
2 months ago
The researcher's credibility has increased: +7
Daniel Roe
has been awarded the fix bounty
This vulnerability will not receive a CVE
This vulnerability is scheduled to go public on
Aug 14th 2023
router.ts#L139-L142
has been validated
to join this conversation