Skip to content

[Bug]: t3-code MCP bearer token is passed in argv and leaks to other processes and logs #18952

Closed as not planned

Description

@lolu13

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. Start a Claude thread in T3 Code (it gets the t3-code MCP server).
  2. Look at the spawned process: ps -eo args | grep -- --mcp-config (or /proc/<pid>/cmdline).
  3. The full MCP config is in argv, including the bearer credential:
    claude ... --mcp-config {"mcpServers":{"t3-code":{"url":"http://127.0.0.1:3773/mcp","headers":{"Authorization":"Bearer <token>"}}}}

Real-world consequence: a child tool started from the session recorded the full command line. adb (Android SDK platform-tools) wrote it, token included, three times into /tmp/adb.1000.log. Any tool that logs its parent's command line, plus anything that collects ps output (crash reporters, monitoring, diagnostics pasted into bug reports), can capture the token the same way.

Expected behavior

The credential never appears in a process's arguments. For example, write the MCP config to a per-session file readable only by the user (e.g. under $XDG_RUNTIME_DIR, mode 0600, removed when the session ends) and pass its path to --mcp-config, or pass the secret through an environment variable.

Actual behavior

The bearer token is in argv for the lifetime of the session. Every process of the same user can read it, and tools that log command lines persist it to disk.

Related: the server listens on 0.0.0.0:3773 by default, so a leaked token may be usable from the LAN or tailnet (depending on the firewall), not only from localhost.

Impact

Minor bug or occasional failure

Version or commit

0.0.45 (Omarchy package t3code 0.0.45-1)

Environment

Linux (Omarchy / Arch, Hyprland), Claude provider

Logs or stack traces

-tool stdio --resume=<id> --mcp-config {"mcpServers":{"t3-code":{"url":"http://127.0.0.1:3773/mcp","headers":{"Authorization":"Bearer <redacted>"

(excerpt from /tmp/adb.1000.log, token redacted)

Activity

  1. juliusmarminge commented on Oct 13, 2026

    @juliusmarminge
    Member

    Note

    Grok responding on behalf of Julius.

    This is the same Claude MCP bearer-in-argv leak tracked in #10020 / #16028 and fixed in #17408 (merged 2026-10-09). That change puts the token in the child env via ${T3_CODE_MCP_AUTHORIZATION} instead of --mcp-config argv.

    You are on 0.0.45 (released 2026-10-02), which is before that fix. Please upgrade to a build after #17408 (current nightlies are on the 0.0.46 line) and reopen if argv still shows the bearer.

    Closing as a duplicate of #10020.

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

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions