-
-
Couldn't load subscription status.
- Fork 1k
Open
Description
Describe the bug
function Test () {
let i = 'javascript:alert(1);'
return (
<iframe src={i} />
)
}
When setting javascript:alert(1) on the iframe's src, an XSS attack will be triggered. This always happens on both the server and client sides.
React's setProp handles src and href separately, filtering out this potential risk.
I think this risk should be addressed at the framework level.
Your Example Website or App
https://playground.solidjs.com/anonymous/c9f1616a-47c3-4b50-870b-f4ab9c9d2b3f
Steps to Reproduce the Bug or Issue
View case
Expected behavior
no alert
Screenshots or Videos
No response
Platform
- OS: [e.g. macOS, Windows, Linux]
- Browser: [e.g. Chrome, Safari, Firefox]
- Version: [e.g. 91.1]
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels