Skip to content

[BUG] AWS SSM session TokenValue logged at Info level [backplane-cli] #973 #8

Description

@samanthajayasinghe

After StartSession returns, the code emits the SSM StreamUrl and TokenValue with logger.Infof. logrus defaults to Info, so every invocation of ocm-backplane cloud ssm-session prints the websocket auth token to stdout/terminal scrollback and any log collector attached to the SRE workstation. The token is sufficient on its own to attach to the live SSM session against the customer EC2 instance.

Evidence

logger.Infof("SessionId: %v", *result.SessionId)
logger.Infof("StreamUrl: %v", *result.StreamUrl)
logger.Infof("TokenValue: %v", *result.TokenValue)
cmd/ocm-backplane/cloud/ssm.go:253-255

Remediation
Drop the TokenValue (and StreamUrl) log lines entirely, or downgrade to Trace and redact the token. The session JSON is already passed privately to session-manager-plugin via argv.

Attack Pattern
Local user or log-aggregation reader on the SRE host → hijack the active AWS SSM session to the managed-cluster EC2 node.

Details
Severity: high (CVSS 6.5 — CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N)
CWEs: CWE-532; CWE-312
Category: OWASP K8s K03 Secrets Management / ASVS V7.1 Log Content
Repository: https://github.com/openshift/backplane-cli
Commit: 512767c
Location: cmd/ocm-backplane/cloud/ssm.go

Source
This finding was identified by Project Glasswing: HCMSEC-3528: Prototype AI scanning/testing/fixes across Hybrid Platforms to support the AI SDLC
New

Finding path: backplane/backplane-cli

As this content is AI generated, it should be reviewed with scrutiny for accuracy.

Activity

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

    bugSomething isn't workingtriaged

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions