Skip to content

Importing a Comment node named __proto__ breaks the editor #5979

Closed

Description

@this-caroline

Current Behavior

Importing a Comment node whose name is __proto__ leaves the Import nodes dialog open even though the node appears on the canvas.
The browser console reports RangeError: Maximum call stack size exceeded, and subsequent editor interactions can produce additional JavaScript errors.

The editor search index stores the node on Object.prototype instead of an ordinary index entry.
Searching the index for __proto__ does not return the node.

Expected Behavior

The import should complete and close the dialog.
The editor should remain usable, and searching for __proto__ should return the Comment node.

The Comment node name is a plain text field with no restriction on this value.

Steps To Reproduce

  1. Open a fresh Node-RED editor with an empty flow.
  2. Open Menu → Import → Clipboard.
  3. Paste the example flow below.
  4. Click Import.
  5. Observe that the import dialog remains open and the browser console reports stack-overflow errors.

Example flow

[
    {
        "id": "ui-search-repro",
        "type": "comment",
        "name": "__proto__",
        "info": "",
        "x": 260,
        "y": 140,
        "wires": []
    }
]

Environment

  • Node-RED version: 5.0.7, running from a repository checkout
  • Node.js version: 22.22.3
  • npm version: 10.9.8
  • Platform/OS: macOS 26.5.2, Apple Silicon
  • Browser: Google Chrome
  • Reproduced using a separate user directory and a fresh flow

Activity

  1. colinl commented on Oct 5, 2026

    @colinl
    Contributor

    Also creating a comment node with that name locks up the editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions