# CVE-2026-40602

> Vulnerability · severity: **MEDIUM** (CVSS 5.6).

## 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.

## Key facts

- **CVE ID:** CVE-2026-40602
- **Published:** 2026-04-21
- **CVSS severity:** MEDIUM
- **CVSS base score:** 5.6
- **CWE codes:** CWE-94, CWE-1336

## Affected products

- `home-assistant-ecosystem:home_assistant_command-line_interface`

## Primary sources

- NIST NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-40602

## Citation

> AI Analytics. CVE-2026-40602. Retrieved 2026-07-15 from https://api.ai-analytics.org/cve/CVE-2026-40602. Derived from NIST NVD. Licensed CC0.

---

*[Dataset catalog](https://api.ai-analytics.org/datasets/) · [AI Analytics](https://api.ai-analytics.org/) · CC0 1.0*