CVE-2024-4067Regular Expression Denial of Service in micromatch
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 doesn't 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 won't start backtracking the regular expression due to greedy matching. This issue was fixed in version 4.0.8.
What to do
Fixed builds are available from Debian, npm: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | node-micromatch | Fix pending | UBUNTU-CVE-2024-4067 | |
| Ubuntu 26.04 | node-micromatch | Under investigation | UBUNTU-CVE-2024-4067 | |
| Ubuntu 25.10 | node-micromatch | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-4067 | |
| Ubuntu 24.04 | node-micromatch | Under investigation | UBUNTU-CVE-2024-4067 | |
| Ubuntu 22.04 | node-micromatch | Under investigation | UBUNTU-CVE-2024-4067 | |
| Ubuntu 20.04 | node-micromatch | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-4067 | |
| Ubuntu 18.04 | node-micromatch | Fix pending | UBUNTU-CVE-2024-4067 | |
| Debian 14 | node-micromatch | Fixed | 4.0.7+~4.0.7-1 | DEBIAN-CVE-2024-4067 |
| Debian 13 | node-micromatch | Fixed | 4.0.7+~4.0.7-1 | DEBIAN-CVE-2024-4067 |
| Debian 12 | node-micromatch | Fix pending | DEBIAN-CVE-2024-4067 | |
| Red Hat Enterprise Linux 9 | gjs | Not affected | ||
| Red Hat Enterprise Linux 9 | gjs-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | pcs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | pcs-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 9 | polkit | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-devel | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-docs | Not affected | ||
| Red Hat Enterprise Linux 9 | polkit-libs | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-azure-monitor | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-cloudwatch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-elasticsearch | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-graphite | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-influxdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-loki | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mssql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-mysql | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-opentsdb | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-postgres | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-prometheus | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-selinux | Not affected | ||
| Red Hat Enterprise Linux 8 | grafana-stackdriver | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60 | Not affected | ||
| Red Hat Enterprise Linux 8 | mozjs60-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | pcs | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | pcs-snmp | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | firefox | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | thunderbird | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | firefox | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | thunderbird | Will not fix Out of support scope | ||
| npm library | micromatch | Fixed | 4.0.8 | GHSA-952p-6rrq-rcjv |
What the vendor says
As published in the CVE record by Checkmarx, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- micromatch: affected: before 4.0.8, 4.0.8 not affected; fixed in
4.0.8
References
- https://devhub.checkmarx.com/cve-details/CVE-2024-4067/
- https://github.com/micromatch/micromatch/pull/266
- https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0ae83ec2ade
- https://github.com/micromatch/micromatch/releases/tag/4.0.8
- https://advisory.checkmarx.net/advisory/CVE-2024-4067/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.