youtube-regex npm Package Regex Denial-of-Service Vulnerability

Vulnerability

A regex denial-of-service vulnerability has been identified in the youtube-regex npm package, affecting versions through 1.0.5. The issue arises from a regex pattern in the package that, when subjected to large input, causes significant processing delays due to excessive backtracking. This vulnerability can be exploited by sending a carefully crafted string that exploits the regex's backtracking behavior, leading to increased processing time and potential performance degradation.

Impact

Exploitation of this vulnerability causes a denial-of-service condition by significantly slowing down the processing time of inputs, with reported delays of over 2.3 seconds for large payloads compared to just over 1 second for smaller ones.

Reproduction

To reproduce this vulnerability, require the youtube-regex package in a Node.js environment. Then, create a payload that includes a YouTube URL pattern, specifically 'watch?m', repeated 30,000 times, followed by a tab character. Use this payload to test the youtube-regex function. The performance can be measured to demonstrate the increased processing time caused by the vulnerability.

Added: May 7, 2026, 4:37 PM
Updated: May 7, 2026, 4:37 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
8.7
remediation
0.0
relevance
7.7
threat
6.4
urgency
2.9
incentive
4.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.