Vulnerability · Published Apr 21, 2026 · Assigned by GitHub_M

CVE-2026-40602hass-cli: Handling of user-supplied Jinja2 templates

Medium 5.6

In plain English

A medium-severity code injection in home-assistant-cli from home-assistant-ecosystem. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.1% (higher than 1% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.6Medium
Exploit odds (30 days)0.1%top 99.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIhomeassistant-cli1.0.0GHSA-33qf-q99x-wpm8
PyPIhomeassistant-cli1.0.0PYSEC-2026-2518

Affected products (as reported)

VendorProductVersions
home-assistant-ecosystem home-assistant-cli < 1.0.0

Weakness: CWE-94, CWE-1336 · Vector: CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N

References