"Ask Claude" types untrusted Grafana text straight into the active pane #2

Closed
opened 2026-10-07 20:04:26 -04:00 by jared · 0 comments
Owner

Source: engineering review, 2026-10-07.

web/src/alerts.js builds the prompt from alert annotations and labels, and main.js sends it with sendInput. Newlines, CR, ESC and control bytes in Grafana text pass through unchanged:

  • If the active window is shell, an embedded newline runs as a root command.
  • A CR submits to Claude, skipping the review step.

Fix: replace [\x00-\x1f\x7f] with spaces and send via term.paste(), so bracketed paste applies. Apply the same to every data-ask-claude source.

_Source: engineering review, 2026-10-07._ `web/src/alerts.js` builds the prompt from alert annotations and labels, and `main.js` sends it with `sendInput`. Newlines, CR, ESC and control bytes in Grafana text pass through unchanged: - If the active window is `shell`, an embedded newline runs as a root command. - A CR submits to Claude, skipping the review step. **Fix:** replace `[\x00-\x1f\x7f]` with spaces and send via `term.paste()`, so bracketed paste applies. Apply the same to every `data-ask-claude` source.
jared added this to the v0.5.0 hardening + header/phone milestone 2026-10-07 20:04:26 -04:00
jared added the securitybug labels 2026-10-07 20:04:26 -04:00
jared closed this issue 2026-10-07 20:15:49 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/devdesk#2