A Leader in the 2026 Gartner® Magic Quadrant™ for Endpoint Protection. Six years running.Six years. Gartner® Magic Quadrant™ Leader.Find Out Why
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-47942

CVE-2021-47942: HACS Path Traversal Vulnerability

CVE-2021-47942 is a path traversal flaw in Home Assistant Community Store (HACS) 1.10.0 that lets unauthenticated attackers access sensitive files and gain admin access. This post covers technical details, impact, and mitigation.

Published: May 21, 2026

CVE-2021-47942 Overview

CVE-2021-47942 is a path traversal vulnerability [CWE-22] in Home Assistant Community Store (HACS) version 1.10.0. The flaw resides in the /hacsfiles/ endpoint, which fails to sanitize directory traversal sequences in requests. Unauthenticated remote attackers can read arbitrary files on the host filesystem by traversing outside the intended directory. The most impactful target is the .storage/auth file, which contains user credentials and refresh tokens. Attackers use the leaked refresh tokens to forge valid JSON Web Tokens (JWTs) and obtain administrative access to the underlying Home Assistant instance. This converts a file read primitive into full account takeover of smart-home automation infrastructure.

Critical Impact

Unauthenticated attackers can read the .storage/auth file via /hacsfiles/ and forge JWTs to gain administrative control of Home Assistant.

Affected Products

  • Home Assistant Community Store (HACS) version 1.10.0
  • Home Assistant deployments with HACS 1.10.0 installed
  • Any internet-exposed Home Assistant instance running the vulnerable HACS integration

Discovery Timeline

  • 2026-05-16 - CVE-2021-47942 published to the National Vulnerability Database (NVD)
  • 2026-05-18 - Record last modified in NVD

Technical Details for CVE-2021-47942

Vulnerability Analysis

The vulnerability is a classic directory traversal flaw in a static file handler. HACS registers the /hacsfiles/ HTTP route to serve community integration assets from a designated content directory. The handler concatenates user-supplied path segments to the base directory without validating or canonicalizing them. As a result, sequences such as ../ traverse upward from the intended root and reach sensitive configuration files. The attack does not require authentication, user interaction, or any local foothold. Because Home Assistant stores long-lived refresh tokens in plaintext within .storage/auth, a single read primitive escalates directly into authenticated session forgery and administrative compromise.

Root Cause

The root cause is missing input validation on the file path component of requests to /hacsfiles/. The handler resolves relative path traversal sequences before opening the requested file, instead of rejecting them or constraining resolution to the content root. This violates the secure file serving pattern defined in [CWE-22], which requires canonicalization and prefix-bound checks against an allow-listed base directory.

Attack Vector

The attack vector is network based and unauthenticated. An attacker sends a crafted HTTP GET request to the HACS endpoint containing repeated ../ sequences followed by the target file path, for example /hacsfiles/../../.storage/auth. The server returns the file contents in the HTTP response body. The attacker parses the JSON response to extract the refresh_token value, then submits it to the Home Assistant /auth/token endpoint to mint a short-lived access JWT. With this token, the attacker performs any action available to the targeted user, including invoking services, modifying automations, and pivoting to integrated devices. A public proof of concept is published as Exploit-DB #49495, and further analysis is available in the VulnCheck Advisory on Home Assistant path traversal.

Detection Methods for CVE-2021-47942

Indicators of Compromise

  • HTTP requests to /hacsfiles/ containing ../, ..%2f, or other encoded traversal sequences in access logs
  • Successful HTTP 200 responses from /hacsfiles/ for paths referencing .storage/auth, configuration.yaml, or secrets.yaml
  • New or unexpected access token grants from /auth/token shortly after suspicious /hacsfiles/ traffic
  • Administrative actions originating from unfamiliar source IP addresses or user agents

Detection Strategies

  • Inspect Home Assistant and reverse proxy logs for traversal patterns in any URI beginning with /hacsfiles/
  • Correlate file-read style requests with subsequent token issuance events in the same session window
  • Alert on outbound responses from /hacsfiles/ that exceed expected sizes for static asset delivery

Monitoring Recommendations

  • Forward Home Assistant home-assistant.log and HTTP access logs to a centralized SIEM for traversal pattern matching
  • Monitor authentication audit events for refresh tokens used from new IP addresses or geolocations
  • Track file integrity on .storage/auth and alert on unexpected read access at the operating system layer

How to Mitigate CVE-2021-47942

Immediate Actions Required

  • Upgrade HACS to a version later than 1.10.0 that addresses the /hacsfiles/ traversal handling
  • Invalidate all existing refresh tokens by clearing .storage/auth entries and forcing re-authentication for every user
  • Rotate API keys, integration secrets, and credentials referenced in secrets.yaml
  • Remove direct internet exposure of Home Assistant and place it behind an authenticated reverse proxy or VPN

Patch Information

Apply the latest release of the HACS integration from the official GitHub HACS Integration Repository. Verify that the deployed version is above 1.10.0 after restart. Refer to the Home Assistant Official Site for guidance on supported core versions and upgrade procedures.

Workarounds

  • Block requests containing .., %2e%2e, or %2f in the path component of /hacsfiles/ URIs at a reverse proxy or web application firewall
  • Restrict access to the Home Assistant UI to trusted IP ranges using network ACLs until patching is complete
  • Disable or uninstall the HACS integration on instances where it is not required
bash
# Example NGINX rule to block traversal attempts against /hacsfiles/
location /hacsfiles/ {
    if ($request_uri ~* "\.\.|%2e%2e") {
        return 403;
    }
    proxy_pass http://homeassistant:8123;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechHome Assistant

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.13%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-22
  • Technical References
  • GitHub HACS Integration Repository

  • Exploit-DB #49495

  • Home Assistant Official Site

  • VulnCheck Advisory: Home Assistant Path Traversal
  • Related CVEs
  • CVE-2026-40602: Home Assistant CLI RCE Vulnerability

  • CVE-2025-25305: Home Assistant Core SSL Vulnerability

  • CVE-2026-33045: Home Assistant XSS Vulnerability

  • CVE-2026-33044: Home Assistant XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English