Yarn Regular Expression Denial-of-Service Vulnerability in Request Manager

Vulnerability

A denial-of-service vulnerability has been identified in Yarn package manager versions through 1.22.22. The issue arises in the 'setOptions' function within 'src/util/request-manager.js', where an inefficient regular expression can be exploited. This vulnerability requires local access to reproduce and only affects unsupported versions of Yarn.

Impact

Exploitation of this vulnerability leads to a regular expression denial-of-service, causing excessive CPU usage and potentially freezing the application.

Reproduction

The vulnerability can be reproduced by embedding maliciously crafted code blocks into Markdown that is parsed by the application. This can be done by using Yarn version 1.22.22, after cloning the repository and installing the necessary dependencies. The 'yarn test' command can be used to trigger the vulnerability by testing the 'util/request-manager.js' file, which will execute the code that contains the inefficient regular expression.

Added: Aug 21, 2025, 4:17 PM
Updated: Aug 21, 2025, 6:32 PM

Vulnerability Rating

Custom Algorithm
spread
6.6
impact
2.5
exploitability
4.6
remediation
7.7
relevance
0.4
threat
6.4
urgency
2.9
incentive
1.7

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