Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessVictim adds attacker-crafted torrent
-
Deliveryfile.path set to '../../../etc/hosts'
-
ExploitgetFileModtimes joins path without containment
-
Executionfs.stat escapes download root
-
ImpactModification time of arbitrary file disclosed
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application built on WebTorrent (<=2.8.5 / <=3.0.21) to (1) add a torrent whose per-file path metadata is attacker-controlled, and (2) invoke torrent.getFileModtimes. The vulnerable branch is only reached when addUID is false (the path.join(this.path, file.path) branch); when addUID is true the traversal branch is not taken. The required user interaction (UI:P) is the victim loading/adding the malicious torrent, which limits mass exploitation. Impact is confined to disclosing modification times and existence of files outside the configured download directory on a Node.js filesystem - there is no confirmed read of file contents, write, or code execution. |
| Impact | This is a moderate-severity path traversal (CWE-22) in WebTorrent's getFileModtimes function, and the signals are internally consistent rather than conflicting. The input CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N) scores 5.3 and matches the mechanism visible in the PR #3046 diff: an attacker-controlled file.path from torrent metadata is passed to path.join(this.path, file.path) without containment checks, so a crafted path like '../../../etc/hosts' escapes the download root. Impact is limited (VC:L, VI:N, VA:N) because getFileModtimes only stat()s files to read modification times - it leaks existence and mtime of arbitrary filesystem paths, not file contents or write access, which is why this is correctly a medium, not a critical. Exploitation status is no public exploit identified at time of analysis in the confirmed sense: the input lists a PoC reference only, not verified as working exploit code, and this is NOT in CISA KEV. No EPSS score was provided, so widespread-exploitation probability cannot be quantified from the input. The vuln.today Decision label is 'this_month', indicating a planned-remediation priority rather than an emergency. One notable caveat: the upstream GitHub issue (#3012) was closed as 'not planned' by the project, yet a fix was subsequently merged via PR #3046 - defenders should confirm which released WebTorrent version actually ships the fix. |
| Exploit ScenarioDerived | An attacker crafts a malicious torrent whose file metadata sets file.path to a traversal string such as '../../../etc/hosts' and gets a victim application to add it and call getFileModtimes (the non-addUID code path). The function then stat()s the out-of-root target, disclosing whether that file exists and its modification time. A public PoC reference exists (the reported GitHub issue), but it is not verified as working exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 09, 2026
Path traversal in WebTorrent's getFileModtimes function (lib/torrent.js) affects releases up to 2.8.5 and up to 3.0.21, letting a torrent with attacker-controlled per-file path metadata steer a filesystem stat call outside the configured download directory when the host application invokes getFileModtimes with addUID disabled. The exposure is limited to disclosure of modification times and existence of files outside the download root on the Node.js filesystem - the assessed vector (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N) confirms no file content read, write, or code execution - and requires the victim to load the malicious torrent (UI:P). A public PoC reference exists (GitHub issue #3012); it is not verified as working exploit code, there is no CISA KEV listing, and an upstream fix has been proposed in PR #3046. The reporter's issue was closed as 'not planned', and priority is assessed as this_month rather than emergency.
RemediationAI
Apply the upstream fix in PR #3046 (https://github.com/webtorrent/webtorrent/pull/3046), which resolves the candidate path against the download root, computes path.relative, and rejects empty, absolute, or '..'-prefixed results with an 'invalid file path' error; the pull request includes a regression test (test/node/path-traversal.js). Patch availability is reported as 'available from vendor' via https://vuldb.com/vuln/432939, but the fix reference is a pull request rather than a tagged release, so a released patched version is not independently confirmed - pin to a build that contains the merged commit and verify the containment check is present before relying on it. Until that is deployed, the practical mitigations are: avoid calling getFileModtimes on torrents whose file metadata comes from untrusted sources, since that call is the only route to the vulnerable code; note that the reporter's issue (https://github.com/webtorrent/webtorrent/issues/3012) was closed as 'not planned', so no vendor response should be assumed beyond the open PR. Alternatively, configure the client with addUID enabled, which routes paths under a name-plus-infohash subdirectory and does not take the vulnerable branch - the trade-off is that downloads land in that generated subdirectory rather than directly in the configured path, which may break existing automation expecting the old layout. Finally, constrain the operating-system permissions of the Node.js process so it cannot stat files outside the download root; this limits the metadata disclosure but does not fix the underlying path handling and may interfere with legitimate reads elsewhere in the application.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
WebTorrent is a JavaScript BitTorrent client that runs both in browsers and on Node.js. Torrent metadata (the .torrent info dictionary) contains a per-file path field under attacker control, and the client normally joins that field onto the user-configured download root. In the vulnerable getFileModtimes code path, the join uses path.join(this.path, file.path) without resolving or confining the result, so a crafted path such as '../../../etc/hosts' escapes the download root and the resulting path is passed to filesystem stat calls that return modification timestamps. The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), i.e. missing canonicalisation and containment checking on a path component supplied by untrusted input. The vulnerable branch is only reached when addUID is false; when addUID is true the joined path is rooted under a name-plus-infohash directory and the traversal is not taken. The upstream PR #3046 changes the join to path.resolve, computes path.relative(rootPath, filePath), and returns an 'invalid file path' error when the relative result is empty, starts with '..', or is absolute; it also adds test/node/path-traversal.js, which drives getFileModtimes with a malicious file path and asserts the rejection. The trigger requires an application built on WebTorrent to add a torrent whose file path metadata is attacker-controlled and then call getFileModtimes on it - applications that never call this function are not exposed through this vector. CPE coverage is generic (cpe:2.3:a:n/a:webtorrent), so version-based scoping should come from the advisory rather than from CPE matching.
Know when Webtorrent gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
Remote attacker-supplied torrent metadata (AV:N/AC:L/PR:N) requires the victim to add the torrent and call the function (UI:R); only file modtimes leak, so C:L, I:N, A:N.
Primary rating from Vendor (VulDB).
CVSS VectorVendor: VulDB
Lifecycle Timeline
3DescriptionCVE.org
A vulnerability was identified in WebTorrent up to 2.8.5/3.0.21. Affected by this vulnerability is the function getFileModtimes of the file torrent.js of the component File Path Handler. Such manipulation of the argument file.path leads to path traversal. The attack may be performed from remote. The exploit is publicly available and might be used. The reported GitHub issue was closed with the label "not planned".
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
EUVD-2026-119879
GHSA-q97r-7gmj-rv8g
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB