{"id":"CVE-2026-40602","published":"2026-04-21T17:40:10Z","modified":"2026-04-21T19:02:03Z","title":"hass-cli: Handling of user-supplied Jinja2 templates","vendor":"home-assistant-ecosystem","product":"home-assistant-cli","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.6,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0015,"percentile":0.02149,"provenance":"source"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-1336","name":"Improper Neutralization of Special Elements Used in a Template Engine"}],"references":[{"url":"https://github.com/home-assistant-ecosystem/home-assistant-cli/security/advisories/GHSA-33qf-q99x-wpm8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/453","tags":["x_refsource_MISC"]}],"priority":{"score":4.3,"factors":[{"name":"EPSS percentile","points":0.43},{"name":"CVSS severity","points":3.92}]},"vendorSlug":"home-assistant-ecosystem","affectedVersions":[{"vendor":"home-assistant-ecosystem","product":"home-assistant-cli","versions":["< 1.0.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-04-21T19:01:54.397388Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"homeassistant-cli","vulnerableRanges":["<1.0.0"],"patched":["1.0.0"],"from":["GHSA-33qf-q99x-wpm8","PYSEC-2026-2518"],"provenance":"source"}],"summary":{"text":"The flaw is in the template rendering component of home-assistant-cli (hass-cli), the command-line tool for Home Assistant, which handled user-supplied Jinja2 templates in an unrestricted environment rather than a sandboxed one. An attacker who can supply a template to hass-cli, which requires local access, high-complexity conditions, existing privileges, and user interaction, can reach Python internals and run code beyond the intended templating scope, gaining high confidentiality and integrity impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:21:36Z"},"euvd":{"id":"EUVD-2026-24211","exploited":false,"provenance":"source"}}