WebTorrent http server XSS #5821
Labels
feature/webtorrent
Label for webtorrent related issues
QA Pass-Linux
QA Pass-macOS
QA Pass-Win64
QA/Test-Plan-Specified
QA/Yes
release-notes/include
security
Milestone
Description
There's a low risk XSS in the WebTorrent http server. It relies on getting the user to visit an HTML page served by the WebTorrent http server but that we do not expose to Brave users in any UI or user flows.
The following steps are required to pull this off:
.torrent
file or magnet link which contains a specially-crafted torrent title or file name.http://localhost:12345/0/file.mp4
, then the user would need to modify it to visithttp://localhost:12345
, the server index page (which lists the files in the torrent).http://localhost:12345
origin.An alternative way to trigger this is:
.torrent
file or magnet link which contains a specially-crafted torrent title or file name.http://localhost:<port>
combinations until they find the one that WebTorrent is using.The reason this seems relatively low risk is that the WebTorrent HTTP server only allows fetching data pieces from the torrent. It doesn't support any other control of the torrent client. Furthermore, even if the attacker attacked the HTTP server itself somehow (e.g. via a malformed request) the HTTP server is being run in a sandboxed Chrome extension context, so potential for damage seems limited.
The only thing the WebTorrent http server origin can do is fetch pieces of the torrent. This origin is distinct from the WebTorrent extension origin, which does not contain an XSS. It seems that the most attacker code can do is e.g. figure out what content the user is downloading and exfiltrate that information to an external server.
The attacker could also install a service worker on
localhost:12345
and attempt to interfere with whatever server may run on that port in the future.Steps to Reproduce
Copied from H1 report.
Actual result:
Expected result:
Reproduces how often:
Easily reproduced
Brave version (brave://version info)
Version 0.71.41 Chromium: 76.0.3809.132 (Official Build) nightly (64-bit)
Version/Channel Information:
Other Additional Information:
Miscellaneous Information:
The text was updated successfully, but these errors were encountered: