Vulnerability library
Security checkApril 04, 2023

Cross-Site Scripting in webtorrent

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmwebtorrent

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

Versions of webtorrent prior to 0.107.6 are vulnerable to Cross-Site Scripting. webtorrent servers started with torrent.createServer() lists a torrent’s title and files in the index page without sanitization. This allows attackers to execute arbitrary JavaScript in the victim’s browser through files with names containing the malicious payload.

Recommendation

Update the webtorrent package to the latest compatible version. Followings are version details:

  • Affected version(s): < 0.107.6
  • Patched version(s): 0.107.6

References

Could your website be exposed too?

SmartScanner can check your website for Cross-Site Scripting in webtorrent and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated April 04, 2023