Skip to content

[SECURITY] netcat (nc) available in sandbox image #808

Closed

Description

@cluster2600

Summary

The base sandbox image includes nc (netcat), a standard tool for reverse shells, port scanning, and data exfiltration. While the OpenShell proxy blocks outbound connections to unauthorised hosts, netcat shouldn't be in the image at all.

Reproduction

$ which nc
/usr/bin/nc

Impact

If a proxy bypass is ever found, netcat is the first tool an attacker (or prompt-injected agent) would reach for. It enables:

  • Reverse shell connections
  • Port scanning of internal networks
  • Raw TCP data exfiltration

The proxy currently blocks these, but defence-in-depth means removing the tool regardless.

Recommendation

Remove netcat-openbsd and netcat-traditional from the sandbox image. Also audit for other unnecessary network tools (nmap, socat, telnet, etc.).

Environment

  • openshell 0.0.14
  • Base sandbox image: ghcr.io/nvidia/openshell-community/sandboxes/base:latest

Activity

  1. cluster2600 commented on Mar 24, 2026

    @cluster2600
    ContributorAuthor

    Related: #796 proposes a command pattern denylist that would provide application-level coverage for this class of issue. Worth addressing together — the image hardening here is the defence-in-depth layer (remove the tool entirely), whilst #796 catches the patterns even if the tool is present via a different path.

  2. BenediktSchackenberg commented on Mar 24, 2026

    @BenediktSchackenberg
    Contributor

    Addressed in #830 — netcat variants are now explicitly purged from the runtime image.

  3. BenediktSchackenberg commented on Mar 26, 2026

    @BenediktSchackenberg
    Contributor

    Fixed via #830 (merged). The sandbox image no longer includes gcc, g++, make, or netcat — removed from the runtime stage.

  4. added theissue type on Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions