Skip to main content

CVE-2022-3517: CWE-400 in minimatch

High
VulnerabilityCVE-2022-3517cvecve-2022-3517cwe-400
Published: Mon Oct 17 2022 (10/17/2022, 00:00:00 UTC)
Source: CVE
Vendor/Project: n/a
Product: minimatch

Description

A vulnerability was found in the minimatch package. This flaw allows a Regular Expression Denial of Service (ReDoS) when calling the braceExpand function with specific arguments, resulting in a Denial of Service.

AI-Powered Analysis

AILast updated: 07/03/2025, 15:40:44 UTC

Technical Analysis

CVE-2022-3517 is a high-severity vulnerability identified in the minimatch package, specifically affecting versions prior to 3.0.5. Minimatch is a widely used JavaScript library for matching file paths against glob patterns, commonly utilized in Node.js environments and various build tools, package managers, and development frameworks. The vulnerability is classified as CWE-400, which corresponds to an uncontrolled resource consumption issue. The flaw arises in the braceExpand function of minimatch when it processes certain crafted input arguments. This leads to a Regular Expression Denial of Service (ReDoS) attack vector, where the underlying regular expression engine can be forced into excessive backtracking, consuming significant CPU resources and causing the application to become unresponsive or crash. The CVSS v3.1 base score is 7.5, indicating a high severity level. The attack vector is network-based (AV:N), requires no privileges (PR:N), no user interaction (UI:N), and affects availability only (A:H) without impacting confidentiality or integrity. Exploitation does not require authentication, making it remotely exploitable by an unauthenticated attacker who can supply malicious input to the vulnerable function. Although no known exploits are currently reported in the wild, the nature of the vulnerability makes it a viable target for denial of service attacks against services relying on minimatch for pattern matching. The vulnerability was published on October 17, 2022, and is recognized by security authorities including Red Hat and CISA. No official patches are linked in the provided data, but upgrading to minimatch version 3.0.5 or later is the recommended remediation.

Potential Impact

For European organizations, the impact of CVE-2022-3517 can be significant, particularly for those relying on Node.js-based applications, development tools, or CI/CD pipelines that incorporate minimatch for file pattern matching. A successful ReDoS attack could degrade service availability, leading to downtime, delayed deployments, or disrupted development workflows. This can affect software vendors, cloud service providers, and enterprises with internal development infrastructure. The denial of service could also be leveraged as part of a broader attack to distract or exhaust resources. While confidentiality and integrity are not directly impacted, the availability disruption can have cascading effects on business operations, customer trust, and compliance with service level agreements (SLAs). Given the widespread use of JavaScript tooling in Europe’s technology sector, especially in countries with strong software development ecosystems, the risk is non-trivial. Organizations in regulated industries such as finance, healthcare, and critical infrastructure should be particularly vigilant, as service interruptions could have regulatory and operational consequences.

Mitigation Recommendations

To mitigate this vulnerability effectively, European organizations should: 1) Immediately identify all instances of minimatch usage within their software stacks, including direct dependencies and transitive dependencies in Node.js projects. 2) Upgrade minimatch to version 3.0.5 or later, where the vulnerability is addressed. 3) Implement input validation and sanitization to restrict or sanitize user-supplied patterns passed to braceExpand or related functions, reducing the risk of malicious input triggering ReDoS. 4) Employ runtime monitoring and anomaly detection to identify unusual CPU usage patterns indicative of ReDoS attempts. 5) Use rate limiting and request throttling on APIs or services that accept pattern inputs to limit the impact of potential abuse. 6) Incorporate dependency scanning tools into CI/CD pipelines to detect vulnerable package versions proactively. 7) Educate development teams about the risks of ReDoS and secure coding practices related to regular expressions and pattern matching. These steps go beyond generic advice by focusing on both patching and operational controls tailored to the nature of the vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
redhat
Date Reserved
2022-10-14T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9816c4522896dcbd656d

Added to database: 5/21/2025, 9:08:38 AM

Last enriched: 7/3/2025, 3:40:44 PM

Last updated: 8/16/2025, 4:04:38 AM

Views: 18

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