Skip to content
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

Redirection vulnerability #443

Open
imscary opened this issue May 11, 2019 · 5 comments
Open

Redirection vulnerability #443

imscary opened this issue May 11, 2019 · 5 comments

Comments

@imscary
Copy link
Contributor

imscary commented May 11, 2019

Like in #367 but combined with XSS. CSP doesn't block it.
https://dweet.dwitter.net/id/13734 will redirect to Google

</script>
<script>
window.location.replace("http://www.google.com")
</script>
<script>
@lionleaf
Copy link
Owner

Nice find!

However, this is taken care of by the iframe-src CSP. It doesn't work when you view the dweet in the feed or a normal dweet view: https://www.dwitter.net/d/13734 (at least in my browser)

dweet.dwitter.net is never meant to be viewed directly, so as long as it only affects direct viewing I don't think this is a problem in practice.

@imscary
Copy link
Contributor Author

imscary commented May 12, 2019

Still can be used as a free redirection hosting from a https source. It can be used at creating phishing attacks.

@lionleaf
Copy link
Owner

That's a fair point. It's not really a critical bug, but it's unfortunate that people can send real dwitter links that then redirects.

If there's a simple fix I'd be happy to implement it, but I'm not too worried.

@imscary
Copy link
Contributor Author

imscary commented May 19, 2019

There are similar attacks on the same method. It would be better if we block dweets that contain </script> or javascript: or </SCRIPT> or //<</
That's what I did to golf512.dx.am because I allow external resources and it works perfect now.

@lionleaf
Copy link
Owner

</script> isn't the problem here. Works just as well without it, you just need to make sure it doesn't start paused: https://dweet.dwitter.net/id/13998?autoplay=1

I'm skeptic of doing any sort of scanning of the dweet code, since javascript has so many ways to get around simple filters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants