/

CVE-2026-33575

Severity:

HIGH RISK

(7.5)

Inadequate Credential Protection in OpenClaw Pairing Setup

CVE-2026-33575

Analyzed

Vulnerability type

Category:

Inadequate Credential Protection

CWE:

CWE-522

Impact:

Unauthorized Access to Gateway Using Long-Lived Shared Credentials

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenClaw embeds a long-lived shared gateway credential directly inside pairing setup codes generated by the /pair endpoint and openclaw qr command.

If setup codes are leaked through chat history, logs, or screenshots, an attacker can recover and reuse the embedded credential outside the intended one-time pairing flow to gain unauthorized access.

Affected context

This vulnerability affects OpenClaw environments that rely on the /pair endpoint or openclaw qr command to provision devices or clients using setup codes.

The issue is relevant when:

  • Setup codes are treated as transient, one-time use tokens in workflows
  • Setup codes are transmitted or stored in relatively low-trust channels (e.g., chat, ticketing, screenshots, logs)
  • The embedded gateway credential is long-lived and shared across sessions, devices, or users

In such scenarios, exposure of a historical setup code can implicitly expose the underlying gateway credential.

Exploit preconditions

  • Attack surface: Any channel or system where setup codes may be stored, forwarded, or displayed (messaging apps, ticket systems, log aggregators, screenshots).
  • Required access: Ability to obtain a previously generated setup code (e.g., from chat history, support tickets, screenshots, terminal logs, or monitoring/logging systems).
  • Trigger point: Using tools or documented formats to extract the embedded shared gateway credential from the setup code, then reusing it to connect to the gateway.
  • Why exploitation is possible: The setup code contains a long-lived gateway credential rather than a strictly scoped, short-lived, one-time token; there is no robust binding between the code and a single pairing event or device, enabling replay and credential reuse.

Why this happens

The core issue is treating a high-value, long-lived shared gateway credential as if it were a transient setup artifact and embedding it directly into pairing setup codes.

This design conflates user-facing pairing tokens—often expected to be short-lived, single-use, and minimally sensitive—with stable authentication secrets that should be tightly protected and never exposed through user workflows.

This maps to CWE-522: Inadequate Protection of Credentials, where sensitive authentication material is stored or transmitted in a context that does not provide appropriate confidentiality or lifecycle controls, allowing recovery and unauthorized reuse by attackers.

Potential impact

  • Unauthorized gateway access using recovered shared credentials
  • Persistent unauthorized connectivity, as long as the embedded credential remains valid
  • Impersonation of legitimate devices or clients during or after the pairing process
  • Lateral movement to other systems that trust the gateway or its authenticated clients
  • Data exfiltration, tampering, or misuse of gateway-managed resources

General mitigation guidance

Effective mitigation focuses on separating pairing tokens from durable credentials and reducing the sensitivity and lifetime of data embedded in user-facing codes.

Common defensive patterns include:

  • Using ephemeral, one-time-use pairing tokens that cannot be reused after initial completion, and do not directly embed long-lived credentials.
  • Deriving device- or session-specific credentials only on the server side after validating the pairing token, instead of shipping stable secrets inside the token.
  • Applying strict scoping and expiration to any secrets involved in pairing flows, ensuring minimally sufficient privileges and short lifetimes.
  • Avoiding shared gateway credentials across devices; instead, issue per-device or per-client credentials that can be individually revoked.
  • Minimizing exposure of setup codes by design (e.g., reducing their presence in logs, masking them in UIs, and limiting where they are printed or displayed).
  • Enforcing least privilege for any account or token used in pairing so that compromise yields minimal access.

How teams detect issues like this

Detection approaches typically rely on both design review and code-level analysis:

  • Architectural review of authentication and pairing flows to confirm that user-facing tokens never contain long-lived or shared credentials.
  • Static analysis or pattern-based code scanning to locate instances where:
  • Gateway or service credentials are serialized directly into user-visible tokens or QR payloads.
  • High-privilege secrets are passed into /pair endpoint handlers or QR generation paths.
  • Code review checklists that include explicit questions about token structure, embedded secrets, and token lifetimes for pairing or provisioning features.
  • Configuration and logging policies that flag or redact sensitive fields from logs and diagnostics, reducing the likelihood of sensitive credential exposure via monitoring infrastructure.
  • Optional use of automated secrets-detection tools to scan token formats and repositories for embedded keys or credentials.

Sources

SourceLink
github.comgithub.com/openclaw/openclaw/security/advisories/GHSA-7h7g-x2px-94hj
vulncheck.comvulncheck.com/advisories/openclaw-long-lived-credential-exposure-in-pairing-setup-codes

Frequently asked

questions

Yes, if an attacker can obtain a setup code through remote means—such as access to chat logs, screenshots, ticketing systems, or centralized logs—they can potentially extract and reuse the embedded gateway credential without physical proximity to the device.

The attacker must be able to access any location where setup codes are stored or shared (for example, internal messaging channels, customer support systems, log archives, or captured terminal output). They do not need direct access to the original pairing device if they can retrieve the historical setup code.

Treat setup codes as low-value, short-lived, one-time tokens and keep all long-lived or high-privilege gateway credentials entirely server-side. Use the pairing token only as a trigger to create or bind dedicated, scoped credentials to a device or client, without ever embedding durable secrets in the code itself.

Start with a clear authentication and secret-lifecycle model: distinguish between user-facing tokens and backend credentials; require threat modeling of pairing and provisioning flows; enforce strong expiration, scoping, and revocation for any token; and incorporate security reviews and automated checks to ensure that sensitive credentials are never serialized into user-visible artifacts.

Find out what's already
exploitable in your codebase.