CVE-2024-4067
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.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Puntuación base: 5.3
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 1.43%
- Percentil entre todas las CVEs puntuadas: 72
- Fecha de la puntuación: 6/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
Tecnologías afectadas (1)
CWE
- CWE-1333
Referencias
- https://advisory.checkmarx.net/advisory/CVE-2024-4067/
- https://devhub.checkmarx.com/cve-details/CVE-2024-4067/
- https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0ae83ec2ade
- https://github.com/micromatch/micromatch/pull/266
- https://github.com/micromatch/micromatch/releases/tag/4.0.8
- https://devhub.checkmarx.com/cve-details/CVE-2024-4067/
- https://github.com/micromatch/micromatch/blob/2c56a8604b68c1099e7bc0f807ce0865a339747a/index.js#L448
- https://github.com/micromatch/micromatch/issues/243
- https://github.com/micromatch/micromatch/pull/247
JSON original (NVD)
Mostrar
{
"id": "CVE-2024-4067",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-4067",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-05-13T16:30:13.286431Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "LOW",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
},
"impactScore": 1.4,
"exploitabilityScore": 3.9
},
{
"type": "Primary",
"source": "nvd@nist.gov",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 5.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"integrityImpact": "NONE",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "LOW",
"privilegesRequired": "NONE",
"confidentialityImpact": "NONE"
},
"impactScore": 1.4,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647",
"affectedData": [
{
"repo": "https://github.com/micromatch/micromatch",
"vendor": "micromatch",
"product": "micromatch",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "4.0.8",
"versionType": "cpe"
},
{
"status": "unaffected",
"version": "4.0.8",
"versionType": "cpe"
}
],
"packageName": "micromatch",
"programFiles": [
"index.js"
],
"collectionURL": "https://www.npmjs.com/package/micromatch",
"defaultStatus": "unaffected",
"programRoutines": [
{
"name": "micromatch.braces = (pattern, options) =>"
}
]
}
]
},
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"affectedData": [
{
"cpes": [
"cpe:2.3:a:micromatch:micromatch:*:*:*:*:*:*:*:*"
],
"vendor": "micromatch",
"product": "micromatch",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "4.0.8",
"versionType": "custom"
}
],
"defaultStatus": "unknown"
}
]
}
],
"published": "2024-05-14T15:42:47.947",
"references": [
{
"url": "https://advisory.checkmarx.net/advisory/CVE-2024-4067/",
"tags": [
"Exploit",
"Third Party Advisory"
],
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647"
},
{
"url": "https://devhub.checkmarx.com/cve-details/CVE-2024-4067/",
"tags": [
"Third Party Advisory"
],
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647"
},
{
"url": "https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0ae83ec2ade",
"tags": [
"Patch"
],
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647"
},
{
"url": "https://github.com/micromatch/micromatch/pull/266",
"tags": [
"Issue Tracking",
"Patch"
],
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647"
},
{
"url": "https://github.com/micromatch/micromatch/releases/tag/4.0.8",
"tags": [
"Release Notes"
],
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647"
},
{
"url": "https://devhub.checkmarx.com/cve-details/CVE-2024-4067/",
"tags": [
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/micromatch/micromatch/blob/2c56a8604b68c1099e7bc0f807ce0865a339747a/index.js#L448",
"tags": [
"Product"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/micromatch/micromatch/issues/243",
"tags": [
"Issue Tracking"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/micromatch/micromatch/pull/247",
"tags": [
"Issue Tracking",
"Patch"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Secondary",
"source": "596c5446-0ce5-4ba2-aa66-48b3b757a647",
"description": [
{
"lang": "en",
"value": "CWE-1333"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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."
},
{
"lang": "es",
"value": "El paquete NPM `micromatch` es vulnerable a la denegación de servicio de expresión regular (ReDoS). La vulnerabilidad ocurre en `micromatch.braces()` en `index.js` porque el patrón `.*` coincidirá con avidez con cualquier cosa. Al pasar un payload malicioso, la coincidencia de patrones seguirá retrocediendo hasta la entrada hasta que no encuentre el corchete de cierre. A medida que aumenta el tamaño de la entrada, el tiempo de consumo también aumentará hasta provocar que la aplicación se cuelgue o se ralentice. Hubo una solución combinada, pero pruebas adicionales muestran que el problema persiste. Este problema se debe mitigar mediante el uso de un patrón seguro que no comience a retroceder la expresión regular debido a coincidencias codiciosas."
}
],
"lastModified": "2026-06-17T08:01:02.453",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:jonschlinkert:micromatch:*:*:*:*:*:node.js:*:*",
"vulnerable": true,
"matchCriteriaId": "39927CB0-B3B1-40B8-8F67-F4B0E930D56C",
"versionEndExcluding": "4.0.8"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "596c5446-0ce5-4ba2-aa66-48b3b757a647"
}