Skip to main content

CVE-2025-9308: Inefficient Regular Expression Complexity in yarnpkg Yarn

Medium
VulnerabilityCVE-2025-9308cvecve-2025-9308
Published: Thu Aug 21 2025 (08/21/2025, 16:02:12 UTC)
Source: CVE Database V5
Vendor/Project: yarnpkg
Product: Yarn

Description

A vulnerability has been found in yarnpkg Yarn up to 1.22.22. This impacts the function setOptions of the file src/util/request-manager.js. Such manipulation leads to inefficient regular expression complexity. Local access is required to approach this attack. This vulnerability only affects products that are no longer supported by the maintainer.

AI-Powered Analysis

AILast updated: 08/21/2025, 16:33:06 UTC

Technical Analysis

CVE-2025-9308 is a vulnerability identified in the yarnpkg Yarn package manager, specifically affecting versions up to 1.22.22. The flaw resides in the setOptions function within the src/util/request-manager.js file, where inefficient regular expression complexity can be triggered. This inefficiency can be exploited to cause excessive CPU consumption or denial of service conditions due to the way the regular expressions are processed. The vulnerability requires local access with low privileges (local access and low privileges are needed) and does not require user interaction or authentication beyond local access. The vulnerability affects only unsupported versions of Yarn, meaning these versions are no longer maintained or patched by the vendor. The CVSS v4.0 score is 4.8, indicating a medium severity level. The attack vector is local, and the impact is primarily on availability due to potential resource exhaustion. No known exploits are currently reported in the wild. The vulnerability does not impact confidentiality or integrity directly but can degrade service availability by exploiting inefficient regex processing. The lack of vendor support for the affected versions means organizations using these versions will not receive official patches, increasing the risk if the vulnerability is exploited.

Potential Impact

For European organizations, the impact of CVE-2025-9308 is primarily related to service availability and operational stability. Yarn is widely used in software development environments for managing JavaScript dependencies, especially in web and application development. Organizations relying on outdated Yarn versions may face denial of service conditions on developer machines or build servers if an attacker with local access triggers the inefficient regex processing. This could delay development cycles, continuous integration/continuous deployment (CI/CD) pipelines, and potentially impact production deployment timelines. While the vulnerability requires local access, insider threats or compromised developer workstations could exploit this to disrupt operations. The lack of vendor support for these versions means no official patches are available, forcing organizations to either upgrade to supported versions or implement workarounds. The impact is less severe on production runtime environments unless Yarn is used there, but the disruption in development and build environments can have cascading effects on software delivery and security patching processes.

Mitigation Recommendations

European organizations should prioritize upgrading to supported Yarn versions beyond 1.22.22, as these versions are no longer maintained and thus vulnerable. If upgrading is not immediately feasible, organizations should restrict local access to developer and build systems running vulnerable Yarn versions, enforcing strict access controls and monitoring for suspicious activity. Implementing endpoint protection and behavior-based anomaly detection can help identify attempts to exploit inefficient regex processing. Additionally, organizations can review and limit the use of untrusted input in Yarn configuration or scripts that might trigger the vulnerable code path. Incorporating Yarn usage into software supply chain security policies and ensuring build environments are isolated and hardened will reduce risk. Finally, organizations should maintain up-to-date inventories of development tools and dependencies to quickly identify and remediate unsupported or vulnerable components.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
VulDB
Date Reserved
2025-08-21T05:58:24.411Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68a746acad5a09ad0012777b

Added to database: 8/21/2025, 4:17:48 PM

Last enriched: 8/21/2025, 4:33:06 PM

Last updated: 8/21/2025, 4:33:06 PM

Views: 2

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats