{
  "id": 22111363,
  "title": "n2n supernode's REGISTER_SUPER_NAK path trusted a 16-bit length",
  "url": "https://urgent.news/2026/11/27/n2n-supernodes-register-super-nak-path-trusted-a-16-bit-length",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-27T04:18:19.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/johnettagaweraks/n2n-supernodes-registersupernak-path-trusted-a-16-bit-length-462n"
  },
  "original_language": "en",
  "account": "The n2n peer-to-peer VPN employs supernodes to facilitate communication between individual nodes and the exchange of control messages. One such message, REGISTER_SUPER_NAK, is utilized to register a supernode within a community. CVE-2026-136404 addresses a vulnerability in n2n versions 3.0 through 3.1.1, where the authentication-token size within this message was not properly validated during a stack buffer operation. This allowed a remote, unauthenticated attacker to register a supernode and send a malformed REGISTER_SUPER_NAK datagram with an oversized token_size. The consequences of this exploitation could include memory disclosure, stack canary or pointer leakage, return-address corruption, and ultimately, a denial of service. The vulnerability scores a high impact of 4.0 in CVSS terms, encompassing confidentiality, integrity, and availability.\n\nThe issue arises due to the use of a 16-bit length field, which can exceed the size of a stack allocation, leading to overwriting of adjacent local state. Despite the advisory describing the exploited path as unauthenticated, it is important to note that registration can occur before a verified peer identity is established, and the NAK handler must still parse the message to validate the registration. Superseding the vulnerable length occurs during this pre-validation stage.\n\nTo mitigate this risk, a comprehensive approach is recommended. First, identify all n2n supernodes and edge deployments, including any UDP services exposed to the internet or utilized in remote-access overlays. Document the n2n version, build source, listening ports, community configurations, and discoverability from untrusted networks for each instance. The secure build should be derived from the upstream n2n project after the patch in commit 854fbbe01bbf131bf4cb88f8450d7084267668e1, or its released equivalent. Verify the binary version on each running host to ensure the correct build is in use.\n\nRestrict UDP access to the supernodes until the upgrade is complete, employing firewall rules, private networks, or mesh-specific allowlists to control which systems can reach the control port. Implement a source-address filter to minimize the potential for unauthorized systems to send crafted datagrams. Post-upgrade, run the project's relevant tests and include a regression input for oversized token_size. Confirm that the packet is rejected before any copying occurs and that malformed values do not alter control flow. Specifically test with the exact protocol version and a packet capture from a benign registration flow.\n\nFurther scrutiny should be given to crash dumps and service restarts, looking for signs of malformed registration traffic, such as repeated NAK messages, unusual community identifiers, source addresses not belonging to known edges, and supernode processes restarting after receiving traffic from the same host.\n\nIf a supernode may have executed compromised code, it should be isolated, and community and authentication material should be rotated. Review the edges that interacted with the compromised supernode. It is crucial to remember that a supernode acts as a trust broker, and compromise could result in the exposure of membership information, manipulation of discovery mechanisms, or redirection of peers. The severity of the impact hinges on the specific overlay design and the privileges held by the supernode process.\n\nUltimately, the patch should be supported by robust protocol discipline. Define a maximum token length at the wire-format layer, rejecting any declarations that exceed this limit, and ensure all copies occur within a checked destination. Log malformed packets without retaining sensitive data. Where possible, execute the parser within a memory-safe test harness. The CVE-2026-136404 vulnerability underscores the potential for seemingly minor fields in control messages to engender significant network security concerns, emphasizing the need for a comprehensive approach to secure configuration, testing, and monitoring of n2n supernodes.",
  "summary": "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…",
  "key_points": [
    "n2n VPN uses supernodes for communication",
    "CVE-2026-136404 allows supernode registration with oversized tokensize",
    "Mitigation involves patching, restricting UDP access, and monitoring"
  ],
  "editors_take": "Improper validation of message length fields allows unauthenticated attackers to compromise supernodes, turning these central trust brokers into entry points for memory corruption and network-wide service disruptions.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}