CVE-2026-40602
MEDIUM 5.6CVSS 3.1Home Assistant Command-line Interface: Handling of user-supplied Jinja2 templates
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.
- Published
- 21 Apr 2026
- Last modified
- 26 Oct 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-1336CWE-94
- Also known as
- GHSA-33qf-q99x-wpm8PYSEC-2026-2518
- Sources
- NVDJSONOSV GHSA-33qf-q99x-wpm8JSONOSV PYSEC-2026-2518JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
| OSV | PyPA | CVSS 3.1 | MEDIUM 5.6 | CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | home-assistant-ecosystem | home_assistant_command-line_interfacecpe:2.3:a:home-assistant-ecosystem:home_assistant_command-line_interface:*:*:*:*:*:*:*:* |
< 1.0.0 | 1.0.0 |
| OSV | PyPI | homeassistant-cli | < 1.0.0 | 1.0.0 |
References
- https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/453 · Issue Tracking, WEB
- https://github.com/home-assistant-ecosystem/home-assistant-cli/security/advisories/GHSA-33qf-q99x-wpm8 · Mitigation, Vendor Advisory, 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
History
- 25 Nov 2026 21:02 UTC · NVD: first stored (published 21 Apr 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
- 25 Nov 2026 20:11 UTC · OSV: first stored (published 16 Apr 2026)