CVE-2025-5197
A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically in the `convert_tf_weight_name_to_pt_weight_name()` function. This function, responsible for converting TensorFlow weight names to PyTorch format, uses a regex pattern `/[^/]*___([^/]*)/` that can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. The vulnerability affects versions up to 4.51.3 and is fixed in version 4.53.0. This issue can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting model conversion processes between TensorFlow and PyTorch formats.
CVSS
- Versión: 3.0
- Vector: CVSS:3.0/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.40%
- Percentil entre todas las CVEs puntuadas: 31
- 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
JSON original (NVD)
Mostrar
{
"id": "CVE-2025-5197",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2025-5197",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2025-08-06T13:02:53.771161Z"
}
}
],
"cvssMetricV30": [
{
"type": "Secondary",
"source": "security@huntr.dev",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.0",
"baseScore": 5.3,
"attackVector": "NETWORK",
"baseSeverity": "MEDIUM",
"vectorString": "CVSS:3.0/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": "security@huntr.dev",
"affectedData": [
{
"vendor": "huggingface",
"product": "huggingface/transformers",
"versions": [
{
"status": "affected",
"version": "unspecified",
"lessThan": "4.53.0",
"versionType": "custom"
}
]
}
]
}
],
"published": "2025-08-06T12:15:26.837",
"references": [
{
"url": "https://github.com/huggingface/transformers/commit/944b56000be5e9b61af8301aa340838770ad8a0b",
"tags": [
"Patch"
],
"source": "security@huntr.dev"
},
{
"url": "https://huntr.com/bounties/3f8b3fd0-166b-46e7-b60f-60dd9d2678bf",
"tags": [
"Exploit",
"Issue Tracking",
"Patch",
"Third Party Advisory"
],
"source": "security@huntr.dev"
},
{
"url": "https://huntr.com/bounties/3f8b3fd0-166b-46e7-b60f-60dd9d2678bf",
"tags": [
"Exploit",
"Issue Tracking",
"Patch",
"Third Party Advisory"
],
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
}
],
"vulnStatus": "Analyzed",
"weaknesses": [
{
"type": "Secondary",
"source": "security@huntr.dev",
"description": [
{
"lang": "en",
"value": "CWE-1333"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "A Regular Expression Denial of Service (ReDoS) vulnerability exists in the Hugging Face Transformers library, specifically in the `convert_tf_weight_name_to_pt_weight_name()` function. This function, responsible for converting TensorFlow weight names to PyTorch format, uses a regex pattern `/[^/]*___([^/]*)/` that can be exploited to cause excessive CPU consumption through crafted input strings due to catastrophic backtracking. The vulnerability affects versions up to 4.51.3 and is fixed in version 4.53.0. This issue can lead to service disruption, resource exhaustion, and potential API service vulnerabilities, impacting model conversion processes between TensorFlow and PyTorch formats."
},
{
"lang": "es",
"value": "Existe una vulnerabilidad de denegación de servicio de expresiones regulares (ReDoS) en la librería Hugging Face Transformers, específicamente en la función `convert_tf_weight_name_to_pt_weight_name()`. Esta función, responsable de convertir los nombres de peso de TensorFlow al formato de PyTorch, utiliza un patrón de expresiones regulares `/[^/]*___([^/]*)/` que puede explotarse para causar un consumo excesivo de CPU mediante cadenas de entrada manipuladas debido a un retroceso catastrófico. La vulnerabilidad afecta a las versiones hasta la 4.51.3 y se corrigió en la versión 4.53.0. Este problema puede provocar interrupciones del servicio, agotamiento de recursos y posibles vulnerabilidades del servicio API, lo que afecta los procesos de conversión de modelos entre los formatos de TensorFlow y PyTorch."
}
],
"lastModified": "2026-06-17T09:47:25.920",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:huggingface:transformers:*:*:*:*:*:*:*:*",
"vulnerable": true,
"matchCriteriaId": "028A5B9B-4F6A-41A1-8A94-8F904334B237",
"versionEndExcluding": "4.53.0"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "security@huntr.dev"
}