/

CVE-2026-64824

Severity:

HIGH RISK

(8.4)

Path Traversal (CWE-22) in Home Assistant Backups

CVE-2026-64824

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Remote Code Execution via Arbitrary File Write

Severity:

HIGH RISK

(8.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Home Assistant Core contains a path traversal vulnerability in its backup-restore function, allowing crafted tar archives to write files to arbitrary absolute filesystem paths via symlink abuse.

When the process runs as root in the official Docker image, an attacker who can trigger backup restore may overwrite Python auto-import paths or component directories, potentially leading to remote code execution.

Affected context

The vulnerability occurs in Home Assistant Core backup restoration logic, specifically when processing tar archives that contain symbolic link entries.

It becomes relevant in deployments that:

  • Accept backup archives from potentially untrusted or semi-trusted sources
  • Run Home Assistant inside containers or hosts where the process has elevated privileges (commonly root)
  • Allow backup restoration through exposed administration interfaces or automation

In these contexts, crafted tar contents can influence where restored files are ultimately written on the filesystem.

Exploit preconditions

  • Attack surface: Backup import and restore interface of Home Assistant Core
  • Required access: Ability to supply and trigger restoration of a crafted backup tar archive (e.g., access to admin UI, API, or backup upload channel)
  • Trigger point: Execution of the backup-restore function that processes tar members, including symbolic links and subsequent regular file entries
  • Why exploitation is possible: The tar extraction logic trusts the combination of a benign member name and an absolute linkname in symlink entries without restricting paths to the intended extraction directory, enabling writes through the unvalidated symlink to arbitrary locations.

Why this happens

This issue stems from insufficient validation of filesystem paths during archive extraction.

The backup-restore implementation processes tar entries that include symbolic links (SYMTYPE) and follows those links when writing subsequent regular-file members.

Because it does not enforce that the resolved path remains within the designated extraction directory, an attacker can pair a harmless-looking tar member with a symlink whose linkname is an absolute path outside the restore location.

This pattern maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the application fails to restrict file writes to safe, constrained directories when handling user-controlled paths.

Potential impact

  • Attackers may write arbitrary files to absolute paths on the host or container filesystem.
  • Attackers could overwrite Python auto-import targets such as site-packages/sitecustomize.py to execute code on application startup.
  • Attackers can modify or replace custom component directories to run malicious logic inside Home Assistant.
  • Attackers may alter configuration or state files, potentially disrupting service or degrading integrity of automation rules.
  • In privileged deployments, attackers could gain full remote code execution and pivot to broader system compromise.

General mitigation guidance

Effective mitigation focuses on constraining where restored files can be written and reducing the trust placed in archive contents.

Common defensive patterns include:

  • Validating and normalizing all paths derived from archive entries, ensuring that resolved targets remain under a dedicated backup restore directory.
  • Ignoring or strictly limiting processing of symbolic links, hard links, and other indirections when dealing with user-supplied archives.
  • Using safer archive extraction helpers that explicitly enforce directory boundaries and reject absolute or parent-relative paths.
  • Running the Home Assistant process with reduced privileges and restricting filesystem access to only what is required for normal operation.
  • Separating executable code paths from writable data directories, so that even if arbitrary writes occur, they cannot easily modify code-loaded locations.

How teams detect issues like this

Organizations can detect and manage this class of vulnerability through:

  • Static analysis rules and secure coding guidelines that flag unsafe tar or archive extraction patterns, especially where symlinks and absolute paths are honored.
  • Code reviews that examine backup/restore and import/export logic for proper path normalization and directory confinement.
  • Runtime monitoring or file integrity checks on critical code directories (e.g., Python site-packages, custom components) to detect unexpected changes following backup operations.
  • Policy enforcement in CI/CD pipelines that disallow custom extraction helpers without explicit path boundary checks, and favor well-audited libraries or wrappers.

Sources

SourceLink
github.comgithub.com/home-assistant/core/commit/1e457600f1093c15e1325742d03e2b76498c79c1
github.comgithub.com/home-assistant/core/pull/172252
github.comgithub.com/home-assistant/core/releases/tag/2026.7.0
vulncheck.comvulncheck.com/advisories/home-assistant-core-symlink-path-traversal-rce-via-backup-restore
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-78r8-wwqv-r299

Frequently asked

questions

It can be, if an attacker has remote access to the interface or API used to upload and restore backups. Exploitation depends on how backup restore is exposed and authenticated, but in many setups administrative access can be reached over the network.

An attacker must be able to provide a crafted tar backup and successfully trigger the restore process. This typically requires administrative or high-privilege access to Home Assistant's backup/restore functionality, or compromise of a workflow that automates restores.

The safest pattern is to enforce strict directory confinement when restoring archives: normalize and validate paths, reject absolute or parent-relative paths, and avoid following symlinks from untrusted archives. In addition, limit write access to data-only directories and keep executable code paths read-only.

Preventive strategies include adopting secure archive extraction utilities, embedding path validation checks into coding standards, running services with least privilege, segregating code from writable data locations, and subjecting backup/restore logic to focused security review and automated scanning.

Find out what's already
exploitable in your codebase.