CVE-2026-40602 json
hass-cli: Handling of user-supplied Jinja2 templates
published 2026-04-16 6 mo ago modified 2026-10-26 13 d ago also GHSA-33qf-q99x-wpm8 , PYSEC-2026-2518 , EUVD-2026-24211
- cvss
- 5.6
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 0%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi homeassistant-cli 1.0.0
- home-assistant-ecosystem home_assistant_command-line_interface 1.0.0
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2026-40602 updated cvss 8.2
home-assistant-cli: Jinja2: Home Assistant Command-line interface: Arbitrary code execution via unrestricted Jinja2 template rendering
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 6 mo ago
Exploit prediction
0.10% chance of exploitation in the next 30 days, higher than 0% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.6 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
| OSV | 3.1 | 5.6 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 5.6 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | homeassistant-cli | <1.0.0 |
1.0.0 |
Affected products
- home-assistant-ecosystem home-assistant-cli
Classification
References
-
github.com
/home-assistant-ecosystem/home-assistant-cli/pull/453
web, issue-tracking
-
github.com
/home-assistant-ecosystem/home-assistant-cli/security/advisories/GHSA-33qf-q99x-wpm8
web, mitigation, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2026-40602
advisory
-
github.com
/home-assistant-ecosystem/home-assistant-cli
package
-
pypi.org
/project/homeassistant-cli
package
-
github.com
/advisories/GHSA-33qf-q99x-wpm8
advisory
Sources
- CVE List CVE-2026-40602
- GitHub Advisory GHSA-33qf-q99x-wpm8
- NVD CVE-2026-40602
- OSV PYSEC-2026-2518
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.