Netbird's enforcement of admin permissions on client to execute 'netbird ssh' is unnecessary #2252

Open
opened 2025-11-20 07:06:32 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @jbatesy on GitHub (Sep 7, 2025).

Describe the problem

The netbird client checks if the user has client-side admin access before executing 'netbird ssh user@host', this check exists only as security theater and does not mitigate the risk of having 'netbird ssh' enabled.

Just because user1 has local admin access, it doesn't mean they should have admin access to my servers:

A stop-gap measure could be to make this local admin check optional by configuration set on netbird control panel.

To Reproduce

Steps to reproduce the behavior:

  1. Enable netbird SSH on the target
  2. Connect to target using 'netbird ssh' on endpoint
  3. Result: error: you must have Administrator privileges to run this command

Expected behavior

  1. Enable netbird SSH on the target
  2. Connect to target using 'netbird ssh' on endpoint
  3. Netbird validates that my group has access to the user, access is granted if so. No local admin access required.

A clear and concise description of what you expected to happen.

Are you using NetBird Cloud?

No, self-hosted

Please specify whether you use NetBird Cloud or self-host NetBird's control plane.

NetBird version

netbird version

Is any other VPN software installed?

No

Additional context

I'm pretty sure this is working as designed. The built-in SSH server doesn't have many guardrails (we have an extensive rework of the feature on the roadmap), resulting in giving unlimited permissions on the host you're connecting to (you can just root@host.netbird.cloud). I'm quite sure there was an issue opened about it, but I can't find it to cross-link right now.

To mitigate this, there is IsAdmin() check enforced while trying to use it on the client side, so it is working as designed.

Originally posted by @nazarewk in #2743

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings
Originally created by @jbatesy on GitHub (Sep 7, 2025). **Describe the problem** The netbird client checks if the user has client-side admin access before executing 'netbird ssh user@host', this check exists only as security theater and does not mitigate the risk of having 'netbird ssh' enabled. Just because user1 has local admin access, it doesn't mean they should have admin access to my servers: A stop-gap measure could be to make this local admin check optional by configuration set on netbird control panel. **To Reproduce** Steps to reproduce the behavior: 1. Enable netbird SSH on the target 2. Connect to target using 'netbird ssh' on endpoint 3. Result: error: you must have Administrator privileges to run this command **Expected behavior** 1. Enable netbird SSH on the target 2. Connect to target using 'netbird ssh' on endpoint 3. Netbird validates that my group has access to the user, access is granted if so. No local admin access required. A clear and concise description of what you expected to happen. **Are you using NetBird Cloud?** No, self-hosted Please specify whether you use NetBird Cloud or self-host NetBird's control plane. **NetBird version** `netbird version` **Is any other VPN software installed?** No **Additional context** > I'm pretty sure this is working as designed. The built-in SSH server doesn't have many guardrails (we have an extensive rework of the feature on the roadmap), resulting in giving unlimited permissions on the host you're connecting to (you can just `root@host.netbird.cloud`). I'm quite sure there was an issue opened about it, but I can't find it to cross-link right now. > > To mitigate this, there is [`IsAdmin()` check enforced](https://github.com/netbirdio/netbird/blob/b75a7d923c28c6e848f023680674b28d8254c144/client/cmd/ssh.go#L54-L57) while trying to use it on the client side, so it is working as designed. _Originally posted by @nazarewk in [#2743](https://github.com/netbirdio/netbird/issues/2743#issuecomment-3073445557)_ **Have you tried these troubleshooting steps?** - [x] Reviewed [client troubleshooting](https://docs.netbird.io/how-to/troubleshooting-client) (if applicable) - [x] Checked for newer NetBird versions - [x] Searched for similar issues on GitHub (including closed ones) - [x] Restarted the NetBird client - [x] Disabled other VPN software - [x] Checked firewall settings
saavagebueno added the triage-needed label 2025-11-20 07:06:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2252