Case · DiggingBeagle record

Mage terminal WebSocket replayed PTY output before authentication

A reachable terminal WebSocket could replay a named PTY output buffer before verifying its client token, making output secrecy different from command-input blocking.

Scope

Mage AI terminal PTY WebSocket; proposed PR #6206; unauthenticated named-session output replay.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Evidence
Grade C
Remediation
mitigation available
AI role
AGAINST AI
Basis and provenance

PR #6206 documents a tested pre-authentication replay path and proposed regression tests, but the visible GitHub page remains open as of inspection. No confirmed merged package fix or actual victim secret exposure is established. Network and terminal feature restrictions are available provisional mitigations, not proof of repaired code.

Assessed Oct 18, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Step

  2. 02

    Step

  3. 03

    Step

Claims & evidence

CLM-CP13-MAGE-PTY-READAccording to Mage PR #6206, initial terminal output replay could occur before token validation, exposing buffered output under the reproduced path.supported

Basis: reported finding

Link to claim
CLM-CP13-MAGE-PTY-STATUSThe proposed change moves Editor-token authorization ahead of attachment/replay; the accessible PR is not verified as a published fixed package.supported

Basis: reported finding

Link to claim
CLM-ENRICH-MAGE-PTY-OPENAs inspected, Mage PR #6206 remained open, and its proposed terminal authentication changes cannot be described as a merged production patch.supported

Basis: reported finding

Link to claim

Implications

Control over terminal input and secrecy of terminal output are independent properties. A read-only buffer can contain earlier commands or secret-bearing output even if the client is prevented from writing new commands. This bug does not require the OAuth session flaw, but it requires the named terminal and reachable WebSocket.

Controls and mitigations

  • Until the proposed fix is merged and deployed, restrict terminal WebSocket reachability and treat PTY buffers as privileged output rather than harmless session metadata.
  • After patch deployment, test that unauthenticated clients cannot attach, receive prior bytes, or continue receiving output after a token is revoked.

Unknowns and contradictions

  • No confirmed exposed real secret or exploited remote customer.
  • Patch merge and packaged deployment status remain unverified at this snapshot.

Sources and citation

Material revision history

  1. Oct 18, 2026 · Canonical change recorded · new in release · revision 171