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

- Severity: Medium 5.6 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.11%, higher than 1% of CVEs (2026-12-02)
- Published: 2026-04-16T21:28:39.000Z
- Modified: 2026-10-26T21:10:00.170Z
- Also known as: GHSA-33qf-q99x-wpm8, PYSEC-2026-2518
- Weaknesses: CWE-94, CWE-1336
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- home-assistant-ecosystem home-assistant-cli: < 1.0.0
- homeassistant-cli (PyPI): before 1.0.0
- home-assistant-ecosystem home_assistant_command-line_interface: before 1.0.0

## Every score

- GitHub_M: CVSS:3.1 5.6 Medium `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`
- GitHub: CVSS:3.1 5.6 Medium `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`
- PyPA Advisory Database: CVSS:3.1 5.6 Medium `CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N`

## References

- <https://github.com/home-assistant-ecosystem/home-assistant-cli/security/advisories/GHSA-33qf-q99x-wpm8> (mitigation, vendor-advisory, web)
- <https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/453> (issue-tracking, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40602> (advisory)
- <https://github.com/home-assistant-ecosystem/home-assistant-cli> (package)
- <https://pypi.org/project/homeassistant-cli> (package)
- <https://github.com/advisories/GHSA-33qf-q99x-wpm8> (advisory)

## Sources

- CVE List: [CVE-2026-40602](https://www.cve.org/CVERecord?id=CVE-2026-40602), CVE Terms of Use, modified 2026-04-21
- GitHub Advisory Database: [GHSA-33qf-q99x-wpm8](https://github.com/advisories/GHSA-33qf-q99x-wpm8), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-40602](https://nvd.nist.gov/vuln/detail/CVE-2026-40602), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2518](https://osv.dev/vulnerability/PYSEC-2026-2518), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-40602 · Whole record: https://cve.day/CVE-2026-40602.json · Rebuilt by cve.day 2026-11-25T22:59:19.126Z
