hass-cli: Handling of user-supplied Jinja2 templates
Summary
| CVE | CVE-2026-40602 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-04-21 18:16:51 UTC |
| Updated | 2026-04-21 18:16:51 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 5.6 MEDIUM from [email protected]
CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Problem Types: CWE-94 | CWE-1336 | CWE-94 CWE-94: Improper Control of Generation of Code ('Code Injection') | CWE-1336 CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 5.6 | MEDIUM | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
| 3.1 | CNA | DECLARED | 5.6 | MEDIUM | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
HighPrivileges Required
HighUser Interaction
RequiredScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
NoneCVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Home-assistant-ecosystem | Home-assistant-cli | affected < 1.0.0 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/home-assistant-ecosystem/home-assistant-cli/pull/453 | [email protected] | github.com | |
| github.com/home-assistant-ecosystem/home-assistant-cli/security/advisori... | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.