Skip to content

Replay Attacks Vulnerability In ESP-NOW

Moderate
lhespress published GHSA-wf6q-c2xr-77xj Sep 12, 2024

Package

ESP-NOW

Affected versions

<= 2.5.1

Patched versions

2.5.2

Description

Impact

An replay attacks vulnerability was discovered in the implementation of the ESP-NOW because the caches is not differentiated by message types, it is a single, shared resource for all kinds of messages, whether they are broadcast or unicast, and regardless of whether they are ciphertext or plaintext.

This can result an attacker to clear the cache of its legitimate entries, there by creating an opportunity to re-inject previously captured packets.

Patches

In the magic, now the magic has be modified to use separated caches: one for plaintext and the other for ciphertext. In plaintext must not be allowed to modify the state of the cache dedicated to ciphertext.

BTW, this is not a 100% reliable solution, as an attacker with more effort can still replay old ciphertext. but considering the connectionless nature of ESP-NOW, it's "good enough" for now.

Patched versions of ESP-NOW are listed below:

Branch Commit ID
master 4e30db50

Workarounds

The upgrade is applicable for all applications and users of ESP-NOW component from ESP Component Registry.

Please consider updating to ESP-NOW release containing the fixes mentioned above. Alternatively, the fixes can also be cherry-picked in your codebase.

References

None applicable

Credits

We would like to thank Nozomi Networks Labs for reporting this vulnerability and following up on responsible disclosure.

Severity

Moderate

CVE ID

CVE-2024-42483

Weaknesses

Acceptance of Extraneous Untrusted Data With Trusted Data

The product, when processing trusted data, accepts any untrusted data that is also included with the trusted data, treating the untrusted data as if it were trusted. Learn more on MITRE.