n2n supernode's REGISTER_SUPER_NAK path trusted a 16-bit length
The n2n peer-to-peer VPN uses supernodes to help edges find each other and exchange control messages. One of those messages is REGISTER_SUPER_NAK. CVE-2026-136404 concerns the way n2n versions 3.0 through 3.1.1 handled an authentication-token size inside that message. The field came from the network and was used in a stack buffer operation without adequate validation.
The CVE record describes a remote, unauthenticated attacker who can register an edge in a chosen community and send a REGISTER_SUPER_NAK datagram with an oversized token_size. The likely outcomes include memory disclosure, stack canary or pointer leakage, return-address corruption, and a denial of service. The CVSS 4.0 base score is 9.3 with high confidentiality, integrity, and availability impact.
A protocol length becomes an execution primitive
Packet parsers often combine fixed headers with variable-length fields. The receiver needs to verify that the declared length fits inside the packet, the destination buffer, and the protocol's maximum. A 16-bit value can still exceed a much smaller stack allocation. If the copy uses the untrusted size, the extra bytes overwrite adjacent local state.
n2n uses communities and authentication keys to group edges, but the advisory describes the exploitable path as unauthenticated. That may sound contradictory until the protocol flow is separated. Registration can be reachable before a strong peer identity is established, and the NAK handler must parse the message to decide whether the registration is valid. The vulnerable length is processed in that pre-validation window.
Find supernodes that answer beyond the test lab
Inventory every n2n supernode and edge deployment. Include UDP services exposed to the internet, remote-access overlays for branch offices, containerized test systems, and supernodes used by contractors or partners. Record the n2n version, build source, listening ports, community configuration, and whether the service is discoverable from an untrusted network.
The fixed build should be taken from the upstream n2n project after the patch in commit 854fbbe01bbf131bf4cb88f8450d7084267668e1 or its released equivalent. Confirm the binary version on the running host. A package name alone can be misleading when an operator has built a container from an older tag.
Restrict UDP access to supernodes while the upgrade is pending. Use firewall rules, a private network, or a mesh-specific allowlist so that only intended edges can reach the control port. A source-address filter reduces the number of systems that can send crafted datagrams without repairing the parser.
Validate the message parser
After the upgrade, run the project's relevant tests and add a regression input for the oversized token_size. The test should confirm that the packet is rejected before any copy and that malformed values cannot change control flow. Test with the exact protocol version and a packet capture from a benign registration flow.
Review crash dumps and service restarts for signs of malformed registration traffic. Look for repeated NAK messages, unusual community identifiers, source addresses that do not belong to known edges, and a supernode process that restarts after receiving traffic from the same host. Packet captures can help, but retain only the fields needed for the investigation and protect any keys or community secrets in them.
If a supernode may have executed attacker-controlled code, isolate it, rotate community and authentication material, and review the edges that used it. A supernode is a trust broker. Compromise can let an attacker observe membership, manipulate discovery, or redirect peers. The exact impact depends on the overlay design and the privileges of the supernode process.
Build the next version with bounds checks
The patch needs to be backed by protocol discipline. Define a maximum token length at the wire-format layer, reject declarations that exceed it, and keep copies inside a checked destination. Log malformed packets without storing full secrets. Run the parser under a memory-safe test harness when possible.
CVE-2026-136404 shows how a small field in a control message can become a serious network bug. The response should combine the fixed build with a reachability review and a clear inventory of the supernodes that serve as trust brokers for each community.
References
- CVE Program, CVE-2026-136404
- ntop, n2n parser area
- ntop, supernode message handling
- ntop, patch commit
Top comments (0)