CVE-2019-15782: Cross-Site Scripting in webtorrent

webtorrent Updated 02 Oct 2025

Summary

04/09/2019
Yes i
Moderate
6.1

CVE-2019-15782: Cross-Site Scripting in webtorrent. Affects webtorrent versions < 0.107.6. Fixed in 0.107.6. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

webtorrent is an npm package that allows users to stream torrents directly in their web browser. It provides a server-side component, torrent.createServer(), which creates a server to handle torrent requests. The server lists the title and files of a torrent on the index page. However, versions prior to 0.107.6 do not sanitize the data, making them vulnerable to Cross-Site Scripting (XSS) attacks.

Vulnerability Detail

The vulnerability in webtorrent allows attackers to execute arbitrary JavaScript code in a victim's browser. This can be achieved by creating files with malicious payloads in their names, which are then listed on the index page without proper sanitization. Although the server only allows fetching data pieces from the torrent, the lack of input sanitization poses a risk of executing unintended code in the victim's browser.

How To Fix

Minimum fixed version

0.107.6

This is the first release that contains the fix.

npm install webtorrent@0.107.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability.

Conclusion

The webtorrent package prior to version 0.107.6 is vulnerable to Cross-Site Scripting (XSS) attacks. To ensure the security of your application, it is crucial to upgrade to the latest version of the package. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for webtorrent →

Share this vulnerability

FAQ

webtorrent is an npm package that enables streaming of torrents directly in web browsers.

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

The vulnerability in webtorrent can allow attackers to execute arbitrary JavaScript code in a victim's browser, potentially leading to unauthorized access, data theft, or other malicious activities.

To mitigate the risk, it is recommended to upgrade to version 0.107.6 or later of the webtorrent package, which includes the necessary fixes.

There is no known exploit available for this vulnerability at the moment.

How To Fix

Minimum fixed version

0.107.6

This is the first release that contains the fix.

npm install webtorrent@0.107.6

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback