CVE-2025-12638
Full vulnerability record from the local CVENow database.
Description
Keras version 3.11.3 is affected by a path traversal vulnerability in the keras.utils.get_file() function when extracting tar archives. The vulnerability arises because the function uses Python's tarfile.extractall() method without the security-critical filter='data' parameter. Although Keras attempts to filter unsafe paths using filter_safe_paths(), this filtering occurs before extraction, and a PATH_MAX symlink resolution bug triggers during extraction. This bug causes symlink resolution to fail due to path length limits, resulting in a security bypass that allows files to be written outside the intended extraction directory. This can lead to arbitrary file writes outside the cache directory, enabling potential system compromise or malicious code execution. The vulnerability affects Keras installations that process tar archives with get_file() and does not affect versions where this extraction method is secured with the appropriate filter parameter.
View original CVE JSON
{
"id": "CVE-2025-12638",
"sourceIdentifier": "[email protected]",
"published": "2025-11-28T15:16:00.270",
"lastModified": "2026-10-19T13:10:00.110",
"vulnStatus": "Deferred",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Keras version 3.11.3 is affected by a path traversal vulnerability in the keras.utils.get_file() function when extracting tar archives. The vulnerability arises because the function uses Python's tarfile.extractall() method without the security-critical filter='data' parameter. Although Keras attempts to filter unsafe paths using filter_safe_paths(), this filtering occurs before extraction, and a PATH_MAX symlink resolution bug triggers during extraction. This bug causes symlink resolution to fail due to path length limits, resulting in a security bypass that allows files to be written outside the intended extraction directory. This can lead to arbitrary file writes outside the cache directory, enabling potential system compromise or malicious code execution. The vulnerability affects Keras installations that process tar archives with get_file() and does not affect versions where this extraction method is secured with the appropriate filter parameter."
},
{
"lang": "es",
"value": "La versión 3.11.3 de Keras está afectada por una vulnerabilidad de salto de ruta en la función keras.utils.get_file() al extraer archivos tar. La vulnerabilidad surge porque la función utiliza el método tarfile.extractall() de Python sin el parámetro crítico de seguridad filter='data'. Aunque Keras intenta filtrar rutas inseguras utilizando filter_safe_paths(), este filtrado ocurre antes de la extracción, y un error de resolución de enlaces simbólicos PATH_MAX se activa durante la extracción. Este error provoca que la resolución de enlaces simbólicos falle debido a los límites de longitud de ruta, lo que resulta en una omisión de seguridad que permite que los archivos se escriban fuera del directorio de extracción previsto. Esto puede conducir a escrituras de archivos arbitrarias fuera del directorio de caché, lo que permite un posible compromiso del sistema o la ejecución de código malicioso. La vulnerabilidad afecta a las instalaciones de Keras que procesan archivos tar con get_file() y no afecta a las versiones donde este método de extracción está asegurado con el parámetro de filtro apropiado."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "keras-team",
"product": "keras-team/keras",
"versions": [
{
"version": "unspecified",
"lessThanOrEqual": "latest",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV30": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.0",
"vectorString": "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H",
"baseScore": 8.0,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "LOW",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "HIGH"
},
"exploitabilityScore": 2.1,
"impactScore": 5.9
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2025-11-28T15:07:39.652123Z",
"id": "CVE-2025-12638",
"options": [
{
"exploitation": "poc"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-22"
}
]
}
],
"references": [
{
"url": "https://huntr.com/bounties/f94f5beb-54d8-4e6a-8bac-86d9aee103f4",
"source": "[email protected]"
}
]
}