Skip to content

← Actionable
High, CVSS 7.2amended

ESPHome vulnerable to remote code execution via arbitrary file write

CVE-2024-27081GHSA-8p25-3q46-8q2p

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (esphome 2024.2.1), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI esphome

    Affected
    >= 2023.12.9, <= 2023.12.9
    Fixed in
    2024.2.1

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
7.2 · CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
EPSS
  • CVE-2024-27081: 1.54% estimated exploitation activity in the next 30 days; percentile 74.87 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

Summary Security misconfiguration in edit configuration file API in dashboard component of ESPHome version 2023.12.9 (command line installation) allows authenticated remote attackers to read and write arbitrary files under the configuration directory rendering remote code execution possible. Details It is possible to abuse this path traversal vulnerability both in command line installation and Home Assistant add-on, but it is possible to read and write files only under the configuration directory. The vulnerability is present and exploitable in the command line installation, but it was not possible to confirm an impact in the home assistant add-on version. PoC <img width="482" alt="/edit?configuration=/config/.esphome/esphome.json" src="https://github.com/esphome/esphome/assets/115887876/d2da3180-976e-4bed-b4b9-35ac960a7fb4" <br/ <img width="344" alt="/edit?configuration=/config/.esphome/build/test01/src/main.cpp (firmware for board named test01)"…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-8p25-3q46-8q2p

  2. Revision 1 · created ·

    Published from osv record GHSA-8p25-3q46-8q2p

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2024-27081

Advisory: ESPHome vulnerable to remote code execution via arbitrary file write
IDs: CVE-2024-27081, GHSA-8p25-3q46-8q2p
Record: https://patchnext.com/advisories/cve-2024-27081 (revision 2, source checked 26 Oct 2026, 13:37 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: High (CVSS 7.2)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: esphome 2024.2.1. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI esphome: affected >= 2023.12.9, <= 2023.12.9; fixed in 2024.2.1

## Suggested inspection (read-only)
- `python -m pip show esphome`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on esphome.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-8p25-3q46-8q2p (OSV record GHSA-8p25-3q46-8q2p lists affected ranges: PyPI esphome >=2023.12.9 <2024.2.1 (fixed))
- Verified: https://github.com/advisories/GHSA-8p25-3q46-8q2p (GitHub-reviewed advisory GHSA-8p25-3q46-8q2p lists affected ranges: PyPI esphome >=2023.12.9 <=2023.12.9)

Commands are suggestions: review each one before running it.

Loading voting…