CVE-2025-55293
Executive Summary
CVE-2025-55293 is a critical vulnerability in Meshtastic, an open-source mesh networking solution. The flaw allows an unauthenticated attacker to bypass public key validation and replace a node's public key with a malicious one. By first sending a NodeInfo message with an empty publicKey, the attacker clears the existing key. A subsequent message with a new key is then accepted and stored in the NodeDB, effectively hijacking the node's identity. This can lead to man-in-the-middle attacks, impersonation, and disruption of mesh network trust. The vulnerability is fixed in version 2.6.3.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
Meshtastic is distributed as firmware for ESP32, nRF52, and other microcontrollers, as well as a Python CLI and Android/iOS apps. The vulnerability exists in the core firmware's NodeDB handling. Users should update firmware directly from the official Meshtastic GitHub releases or via the mobile app's firmware update feature. No package manager (NPM, PyPI, Go, Ruby) is involved in the core firmware distribution.
CVSS Breakdown & Threat Level
- CVSS Score: 9.4 (Critical)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Network (AV:N) – The attack is performed over the mesh network.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – The vulnerable component is the only one affected.
- Confidentiality Impact: High (C:H) – Attacker can intercept and decrypt messages.
- Integrity Impact: High (I:H) – Attacker can inject malicious data.
- Availability Impact: High (A:H) – Attacker can disrupt network operations.
Deep Dive & Mechanics
The vulnerability lies in the NodeDB component of Meshtastic firmware. The NodeInfo protobuf message contains a public_key field. The code checks if the incoming public_key is non-empty before overwriting the stored key. However, an attacker can send a NodeInfo with an empty public_key first. This bypasses the check if (p.public_key.size > 0) because the size is 0, and the existing key is cleared (size reset to 0). Then, a second NodeInfo with a new key is sent. The code checks if (info->user.public_key.size > 0) – but since the key was cleared, this check passes, and the malicious key is stored.
This allows an attacker to replace the public key of any known node, enabling:
- Identity Spoofing: Impersonate a trusted node.
- Man-in-the-Middle: Decrypt and re-encrypt messages.
- Denial of Service: Flood the network with fake NodeInfo messages.
Vulnerable vs. Patched Code
Vulnerable Code (pre-2.6.3):
// In NodeDB.cpp or similar
if (p.public_key.size > 0) {
// Overwrite existing key
memcpy(info->user.public_key, p.public_key.data(), p.public_key.size);
}
Attack Flow:
- Attacker sends
NodeInfowithpublic_keyempty (size=0). - The check
p.public_key.size > 0fails, so the existing key is NOT overwritten, but the code may clear the stored key (size set to 0). - Attacker sends second
NodeInfowith a new key. - The check
info->user.public_key.size > 0passes (since size is 0), and the new key is stored.
Patched Code (2.6.3):
// In NodeDB.cpp
if (p.public_key.size > 0 && info->user.public_key.size == 0) {
// Only set key if no key exists
memcpy(info->user.public_key, p.public_key.data(), p.public_key.size);
}
The patch adds a check that the stored key must be empty before accepting a new one, preventing overwrite.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Two Meshtastic devices (e.g., ESP32-based) running vulnerable firmware (<2.6.3).
- A computer with Python and
meshtasticCLI installed. - Access to the mesh network (e.g., via serial or Wi-Fi).
Exploit Steps:
- Identify a target node's NodeNum (e.g., via
meshtastic --info). - Generate a malicious public key (e.g., using
cryptographylibrary). - Send a
NodeInfowith empty public key:from meshtastic import mesh_pb2, portnums_pb2 import serial # Connect to device # Send NodeInfo with empty public_key node_info = mesh_pb2.NodeInfo() node_info.num = target_node_num node_info.user.public_key = b'' # Empty key # Send via serial or radio - Send a second
NodeInfowith the malicious key:node_info.user.public_key = malicious_key_bytes # Send again - The target node's public key is now replaced. All future messages encrypted with the old key can be decrypted by the attacker.
Lab Setup:
- Use two ESP32 boards with Meshtastic firmware 2.6.2.
- Connect one to a computer via USB for serial control.
- Use the other as the victim node.
- Monitor traffic with Wireshark or Meshtastic's debug output.
Blue Team
Detection:
- Monitor for rapid
NodeInfoupdates from the same node. - Alert on
NodeInfomessages with emptypublic_keyfields. - Use firmware version checks to identify vulnerable nodes.
Hunting:
- Search logs for
public_keysize changes. - Correlate NodeInfo updates with known node behavior.
Mitigation:
- Update all nodes to firmware 2.6.3 or later.
- Implement network segmentation for critical nodes.
- Use additional authentication mechanisms (e.g., MQTT with TLS).
Indicators of Compromise (IOCs)
- Network: Multiple
NodeInfomessages from the same node within a short time. - Firmware: Nodes running firmware version < 2.6.3.
- Logs: Entries showing
public_keysize change from non-zero to zero. - Behavior: Unexpected node identity changes or message decryption failures.
Detection Engineering
YARA Rule
rule CVE_2025_55293_Meshtastic_KeyOverwrite {
meta:
description = "Detects Meshtastic firmware with vulnerable public key handling"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-55293"
hash = "sha256:example"
strings:
$vuln_code1 = "if (p.public_key.size > 0)" ascii wide
$vuln_code2 = "if (info->user.public_key.size > 0)" ascii wide
$patch_code = "if (p.public_key.size > 0 && info->user.public_key.size == 0)" ascii wide
condition:
($vuln_code1 or $vuln_code2) and not $patch_code
}
Sigma Rule
title: Meshtastic Public Key Overwrite Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects attempts to overwrite a Meshtastic node's public key via empty key injection
author: Valters IT
date: 2025-04-10
logsource:
product: meshtastic
service: nodeinfo
detection:
selection:
event: "NodeInfo received"
public_key_size: 0
condition: selection
falsepositives:
- Legitimate firmware updates
level: high
Suricata Rule
alert udp any any -> any any (msg:"CVE-2025-55293 Meshtastic Public Key Overwrite Attempt"; content:"|0a|"; depth:1; content:"|00|"; within:2; content:"|00 00 00 00|"; distance:4; within:4; sid:1000001; rev:1;)
Note: This rule is a placeholder. Actual Meshtastic protocol analysis is needed for precise detection.
Remediation & Mitigation
- Immediate: Update all Meshtastic nodes to firmware version 2.6.3 or later.
- Network: Isolate critical nodes on separate channels or use MQTT with TLS.
- Monitoring: Enable logging and monitor for anomalous NodeInfo updates.
- Policy: Implement a firmware update policy for all mesh devices.
- Validation: Use additional out-of-band verification for node identities.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert