CVE-2024-21503
Estado: AplazadaMedia (5.3)—
Versions of the package black before 24.3.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the lines_with_leading_tabs_expanded function in the strings.py file. An attacker could exploit this vulnerability by crafting a malicious input that causes a denial of service.
Exploiting this vulnerability is possible when running Black on untrusted input, or if you habitually put thousands of leading tab characters in your docstrings.
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: 0.98%
- Percentil entre todas las CVEs puntuadas: 61
- Fecha de la puntuación: 7/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)
⚠ Inferidas por IA a partir de la descripción — NVD aún no ha analizado esta CVE; no son CPE verificados.
CWE
- CWE-1333
- CWE-75
Referencias
- https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8
- https://github.com/psf/black/releases/tag/24.3.0
- https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273
- https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8
- https://github.com/psf/black/releases/tag/24.3.0
- https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273
JSON original (NVD)
Mostrar
{
"id": "CVE-2024-21503",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2024-21503",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2024-03-19T13:35:33.402362Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "report@snyk.io",
"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": "report@snyk.io",
"affectedData": [
{
"vendor": "n/a",
"product": "black",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "24.3.0",
"versionType": "semver"
}
]
}
]
},
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"affectedData": [
{
"cpes": [
"cpe:2.3:a:python_software_foundation:black:*:*:*:*:*:*:*:*"
],
"vendor": "python_software_foundation",
"product": "black",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "24.3.0",
"versionType": "custom"
}
],
"defaultStatus": "unknown"
}
]
}
],
"published": "2024-03-19T05:15:09.447",
"references": [
{
"url": "https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8",
"source": "report@snyk.io"
},
{
"url": "https://github.com/psf/black/releases/tag/24.3.0",
"source": "report@snyk.io"
},
{
"url": "https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273",
"source": "report@snyk.io"
},
{
"url": "https://github.com/psf/black/commit/f00093672628d212b8965a8993cee8bedf5fe9b8",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://github.com/psf/black/releases/tag/24.3.0",
"source": "af854a3a-2127-422b-91ae-364da2661108"
},
{
"url": "https://security.snyk.io/vuln/SNYK-PYTHON-BLACK-6256273",
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Deferred",
"weaknesses": [
{
"type": "Secondary",
"source": "report@snyk.io",
"description": [
{
"lang": "en",
"value": "CWE-1333"
}
]
},
{
"type": "Secondary",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"description": [
{
"lang": "en",
"value": "CWE-75"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Versions of the package black before 24.3.0 are vulnerable to Regular Expression Denial of Service (ReDoS) via the lines_with_leading_tabs_expanded function in the strings.py file. An attacker could exploit this vulnerability by crafting a malicious input that causes a denial of service.\r\rExploiting this vulnerability is possible when running Black on untrusted input, or if you habitually put thousands of leading tab characters in your docstrings."
},
{
"lang": "es",
"value": "Las versiones del paquete black anteriores a la 24.3.0 son vulnerables a la denegación de servicio de expresión regular (ReDoS) a través de la funciónlines_with_leading_tabs_expanded en el archivo strings.py. Un atacante podría aprovechar esta vulnerabilidad creando una entrada maliciosa que provoque una denegación de servicio. Es posible explotar esta vulnerabilidad cuando se ejecuta Black en entradas que no son de confianza o si habitualmente coloca miles de caracteres de tabulación iniciales en sus cadenas de documentación."
}
],
"lastModified": "2026-06-17T07:09:37.930",
"sourceIdentifier": "report@snyk.io"
}