CVE Vulnerabilities

CVE-2024-4067

Inefficient Regular Expression Complexity

Published: May 14, 2024 | Modified: Aug 28, 2024
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM

The NPM package micromatch prior to 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in micromatch.braces() in index.js because the pattern .* will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesnt find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persists. This issue should be mitigated by using a safe pattern that wont start backtracking the regular expression due to greedy matching. This issue was fixed in version 4.0.8.

Weakness

The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.

Affected Software

Name Vendor Start Version End Version
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/grafana-rhel8:2.6.1-6 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/istio-cni-rhel8:2.6.1-7 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/istio-must-gather-rhel8:2.6.1-4 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/istio-rhel8-operator:2.6.1-9 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/kiali-ossmc-rhel8:1.89.0-2 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/kiali-rhel8:1.89.1-3 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/kiali-rhel8-operator:1.89.1-1 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/pilot-rhel8:2.6.1-7 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 8 RedHat openshift-service-mesh/ratelimit-rhel8:2.6.1-6 *
Red Hat OpenShift Service Mesh 2.6 for RHEL 9 RedHat openshift-service-mesh/proxyv2-rhel9:2.6.1-4 *
Node-micromatch Ubuntu mantic *

Extended Description

	  Attackers can create crafted inputs that
	  intentionally cause the regular expression to use
	  excessive backtracking in a way that causes the CPU
	  consumption to spike.

Potential Mitigations

References