Skip to content

Releases: esphome/aioesphomeapi

45.3.1

26 May 20:55
0885daa

Choose a tag to compare

What's Changed

  • Replace flag based cleanup in bluetooth_device_connect with per branch cleanup (#1764) @bdraco
  • Re-export COMPONENT_TYPE_TO_INFO from the top-level package (#1765) @bdraco

45.3.0

26 May 20:17
7647f3f

Choose a tag to compare

What's Changed

  • Isolate user-callback exceptions in process_packet (#1762) @esphbot
  • Inherit convert_list from APIModelBase (#1760) @esphbot
  • Cache iana_to_posix_tz, drop per-call singleton closure in get_timezone (#1759) @esphbot
  • Pin per-branch cleanup contract for bluetooth_device_connect (#1761) @esphbot
  • Add benchmarks for callback dispatch with/without exception guards (#1757) @esphbot
  • Add explicit all to model to stop leaking stdlib imports (#1749) @esphbot

Dependencies

8 changes

45.2.2

24 May 02:48

Choose a tag to compare

What's Changed

45.2.1

24 May 00:39

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v45.2.0...v45.2.1

45.2.0

23 May 18:56

Choose a tag to compare

What's Changed

45.1.0

23 May 04:02
4e72197

Choose a tag to compare

What's Changed

Dependencies

5 changes

45.0.4

20 May 14:58
dcd9453

Choose a tag to compare

What's Changed

Dependencies

3 changes

45.0.3

17 May 00:35
b19a2b2

Choose a tag to compare

What's Changed

45.0.2

15 May 23:43
ae0c7c7

Choose a tag to compare

Security / hardening

This release adds two more defensive fixes around the unauthenticated portion of the Noise handshake. Both are low-severity hardening rather than exploitable RCE-style bugs, but worth upgrading for if you log to anything you'd rather not poison or leak.

  • Sanitize unauthenticated server_name, mac_address, and handshake-failure explanation before logging. These three fields ride on the wire before the PSK-authenticated handshake completes, so an on-path attacker (ARP spoof, compromised VLAN device, MITM during plaintext-mode hello) can put anything in them. The previous code interpolated them unescaped into log/error messages and stashed them on self for reuse by every later error path — letting an attacker inject CRLF + ANSI escape sequences into operator-visible logs (HA UI, syslog, monitoring webhooks), forge fake log lines, hijack terminals via CSI sequences, or impersonate a different device's identity in alert messages. The fix decodes once with errors="replace", strips non-printable characters, length-caps to the firmware's actual wire-format limits (32/16/64 bytes), and compares the raw decoded value (not the sanitized one) against expected_name / expected_mac so sanitization can't be used to bypass the identity check. Fixed in #1656.
  • Redact the PSK value from Malformed PSK error messages. _decode_noise_psk() previously embedded the raw PSK string in InvalidEncryptionKeyAPIError on both failure paths (invalid base64, wrong byte length). The exception is logged at WARNING level by the connection layer, so the raw PSK landed in every sink (file logs, journald, log aggregators, Sentry, HA diagnostics bundles). Even a malformed PSK is highly sensitive — typos are nearly identical to the real key, clipboard pastes can carry stray characters, and the pasted value may simply be the real PSK of a sibling device. The fix replaces the value with its character length, which is enough to diagnose paste/encoding errors without exposing the secret. Fixed in #1657.

Threat model is "configuration-time / pre-handshake exposure," not a remote unauthenticated attack — same shape as v45.0.1's fixes.

What's Changed

45.0.1

15 May 20:38
ed64858

Choose a tag to compare

Security / DoS hardening

This release adds bounds checks for several DoS vectors that a misbehaving or compromised ESPHome device could use to OOM the client process (typically Home Assistant). All three require an established API session — i.e. a device the user has already adopted — but a malicious or buggy peer in that session was previously able to:

  • Stream CameraImageResponse chunks indefinitely or rotate cam_msg.key across ~4 billion values to grow the per-subscription reassembly buffer without bound. Affects every install that has an ESPHome camera. Fixed in #1648.
  • Send a length varuint of arbitrary size in plaintext mode (no noise_psk), causing the client to buffer up to that many bytes — easy multi-GiB allocation — or stream \x80\x80… indefinitely with no terminator, growing the receive buffer and forcing repeated O(N²) bigint shifts on every data_received. The noise path was incidentally protected by its fixed 16-bit length header; plaintext had no equivalent cap. Fixed in #1651.
  • Send msg_type=0, which silently routed the payload to the last registered protobuf class instead of dropping it as an unknown message type. Low impact in practice (the connection drops anyway when the parse fails) but a footgun for future code. Fixed in #1645.

Threat model is "adopted device misbehaves," not a remote unauthenticated attack. Plaintext-mode users should upgrade preferentially since #1651 lowers the bar to "anyone who can reach the device on the LAN" (no noise_psk means no auth on the wire and a network attacker can MITM).

What's Changed

  • Bound plaintext varuint length and frame size to prevent buffer-growth DoS (#1651) @bdraco
  • docs: add Cython gotchas section to CLAUDE.md (#1653) @bdraco
  • Don't let zeroconf init failure block the connect attempt (#1652) @bdraco
  • Bound camera image stream reassembly to prevent memory exhaustion (#1648) @bdraco
  • [ci] Use uv for pip installs in CI workflow (#1650) @bdraco
  • Pin ruff target-version to py311 (#1649) @bdraco
  • CLAUDE.md: fix inaccurate ruff target-version and future-import claims (#1647) @bdraco
  • Reject msg_type=0 in process_packet to prevent silent last-class fallback (#1645) @bdraco
  • Expand CLAUDE.md and add pr-workflow skill (#1646) @bdraco
  • Add benchmarks for hot paths affecting real users (#1638) @bdraco

Dependencies

3 changes