Skip to content

[Security] Sensitive values leaked into stdout and model transcripts #18

@fredluz

Description

@fredluz

Summary

Several commands reflect secrets, credentials, and sensitive field values directly into command output. Since Browse is designed for LLM agents, this output is typically fed back into model context and persisted in chat logs, terminal history, and orchestration traces.

Affected Code

  • browse/src/write-commands.ts:97type command echoes all typed text:
    return `Typed "${text}"`;
  • browse/src/write-commands.ts:156cookie command echoes cookie values:
    return `Cookie set: ${name}=${value}`;
  • browse/src/write-commands.ts:166header command echoes header values:
    return `Header set: ${name}: ${value}`;
  • browse/src/read-commands.ts:68forms command dumps password field values:
    value: input.value || undefined,
  • browse/src/read-commands.ts:187storage set echoes stored values:
    return `Set localStorage["${key}"] = "${value}"`;

Impact

Two concrete examples:

  • header "Authorization:Bearer sk-live-..." leaks the bearer token into stdout/model context
  • forms on a page with a filled password field dumps the password as plaintext (including "type": "password", "value": "supersecret")

In an agentic workflow, these values end up in LLM context windows, log files, and potentially shared traces.

Suggested Fix

  • Redact echoed values by default for type, cookie, header, and storage set (e.g., Cookie set: session=****)
  • Never emit value for type=password fields in forms output
  • Consider a --show-secrets flag gated behind explicit consent if raw output is ever needed

Severity

Medium — credential and secret leakage via stdout in an LLM-agent context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions