CVE-2026-40602
Full vulnerability record from the local CVENow database.
Description
The Home Assistant Command-line interface (hass-cli) is a command-line tool for Home Assistant. Up to 1.0.0 of home-assitant-cli an unrestricted environment was used to handle Jninja2 templates instead of a sandboxed one. The user-supplied input within Jinja2 templates was rendered locally with no restrictions. This gave users access to Python's internals and extended the scope of templating beyond the intended usage. This vulnerability is fixed in 1.0.0.
Severity
MEDIUM
CVSS score
5.6
(v3.1)
Vulnerability status
Analyzed
Source identifier
Published
2026-04-21 18:16:51.827000
Last modified
2026-10-26 21:10:00.170000
View original CVE JSON
{
"id": "CVE-2026-40602",
"sourceIdentifier": "[email protected]",
"published": "2026-04-21T18:16:51.827",
"lastModified": "2026-10-26T21:10:00.170",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "The Home Assistant Command-line interface (hass-cli) is a command-line tool for Home Assistant. Up to 1.0.0 of home-assitant-cli an unrestricted environment was used to handle Jninja2 templates instead of a sandboxed one. The user-supplied input within Jinja2 templates was rendered locally with no restrictions. This gave users access to Python's internals and extended the scope of templating beyond the intended usage. This vulnerability is fixed in 1.0.0."
},
{
"lang": "es",
"value": "La interfaz de línea de comandos de Home Assistant (hass-cli) es una herramienta de línea de comandos para Home Assistant. Hasta la versión 1.0.0 de home-assistant-cli, se utilizaba un entorno sin restricciones para manejar plantillas Jinja2 en lugar de uno aislado. La entrada proporcionada por el usuario dentro de las plantillas Jinja2 se renderizaba localmente sin restricciones. Esto daba a los usuarios acceso a los componentes internos de Python y extendía el alcance de la creación de plantillas más allá del uso previsto. Esta vulnerabilidad está corregida en la versión 1.0.0."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "home-assistant-ecosystem",
"product": "home-assistant-cli",
"versions": [
{
"version": "< 1.0.0",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "[email protected]",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N",
"baseScore": 5.6,
"baseSeverity": "MEDIUM",
"attackVector": "LOCAL",
"attackComplexity": "HIGH",
"privilegesRequired": "HIGH",
"userInteraction": "REQUIRED",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 0.3,
"impactScore": 5.2
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-04-21T19:01:54.397388Z",
"id": "CVE-2026-40602",
"options": [
{
"exploitation": "none"
},
{
"automatable": "no"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-94"
},
{
"lang": "en",
"value": "CWE-1336"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:home-assistant-ecosystem:home_assistant_command-line_interface:*:*:*:*:*:*:*:*",
"versionEndExcluding": "1.0.0",
"matchCriteriaId": "07740846-6543-4428-9054-ED1EDD1B003E"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/453",
"source": "[email protected]",
"tags": [
"Issue Tracking"
]
},
{
"url": "https://github.com/home-assistant-ecosystem/home-assistant-cli/security/advisories/GHSA-33qf-q99x-wpm8",
"source": "[email protected]",
"tags": [
"Mitigation",
"Vendor Advisory"
]
}
]
}