Severity:

CRITICAL RISK

(9.1)

Improper Remote Code/Command Execution Environment Control

CVE-2026-8634

Deferred

Vulnerability type

Category:

Improper Remote Code/Command Execution Environment Control

CWE:

CWE-94

Impact:

Credential Exposure and Remote Environment Compromise

Severity:

CRITICAL RISK

(9.1)

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

Crabbox prior to v0.12.0 contains an environment variable exposure flaw that can leak local secrets such as API tokens, cloud credentials, and broker tokens into a remote command environment.

When a malicious or compromised repository configures overly permissive environment variable allowlists, it can cause sensitive local environment variables to be serialized and forwarded into remote command execution, exposing credentials to the remote side.

Affected context

This vulnerability affects Crabbox usage patterns where:

  • Users execute Crabbox against repositories they do not fully control or trust.
  • Repo-local Crabbox configuration can define which environment variables are forwarded to the remote execution context.
  • Local environments contain sensitive credentials in environment variables (e.g., cloud provider keys, CI/CD tokens, API keys).

Under these conditions, a malicious repository can influence Crabbox to forward secrets into the remote environment during command execution.

Exploit preconditions

  • Attack surface: Crabbox invocation against a repository with repo-local configuration (e.g., developer workstation, CI runners).
  • Required access: Ability to introduce or modify the Crabbox configuration within the target repository (e.g., by controlling a repo, submitting a malicious PR, or compromising the repo).
  • Trigger point: A user or automation runs Crabbox commands on the affected repository, causing the tool to honor the repo-local environment variable allowlist.
  • Why exploitation is possible: Crabbox trusts repo-local configuration to define which environment variables to forward, allowing untrusted configuration to request forwarding of sensitive variables from the local environment into the remote command context without adequate restriction.

Why this happens

The core issue is insufficient control over how untrusted configuration influences the remote execution environment.

Crabbox allows repository-local configuration files to specify environment variables that should be forwarded to the remote process. Because this configuration may come from untrusted or semi-trusted repositories, it effectively lets an attacker declare which local environment variables will be exposed to remote commands.

This maps to the broader class of remote execution and environment control issues described by CWE-94, where untrusted input influences the behavior and context of executed commands. In this case, the insecure pattern is treating repo-local configuration as trustworthy for selecting sensitive environment variables, without enforcing strict allowlists, privilege separation, or trust boundaries.

Potential impact

  • Exposure of API keys, cloud credentials, and broker tokens from the local environment to a remote system.
  • Unauthorized access to cloud accounts, databases, or messaging brokers using leaked credentials.
  • Lateral movement within an organization's infrastructure via compromised tokens.
  • Persistence and further compromise if leaked credentials are long-lived or highly privileged.
  • Data exfiltration or destructive operations in cloud or SaaS environments tied to the exposed secrets.

General mitigation guidance

Effective mitigation focuses on reducing trust in repo-local configuration and constraining which environment variables can ever be forwarded:

  • Enforce a global, tool-controlled allowlist of environment variables that are considered safe to forward, independent of repository configuration.
  • Treat repo-local configuration as untrusted input; avoid allowing it to directly reference arbitrary environment variables, especially those matching common credential patterns.
  • Provide secure-by-default modes where no secrets are forwarded unless explicitly opted-in by a trusted operator or centralized policy.
  • Encourage separation of duties by running Crabbox with dedicated, minimal environments that do not contain high-value credentials, especially in CI/CD.
  • Apply least-privilege to any credentials that must be present, limiting their scope, duration, and accessible resources so that exposure has reduced blast radius.

How teams detect issues like this

Organizations can detect and manage this class of issue using:

  • Configuration review: Periodically scan repositories for Crabbox configuration that requests forwarding of broad or sensitive environment variables (e.g., *KEY*, *TOKEN*, AWS_*, GCP_*).
  • Static analysis / policy checks: Integrate automated checks into CI that flag or block repo-local Crabbox configs requesting dangerous environment variable names.
  • Secret scanning: Monitor remote logs, command traces, and storage for patterns indicating environment variable content or secrets being echoed or stored unexpectedly.
  • Runtime monitoring: Instrument Crabbox or wrapper scripts to log which environment variables are forwarded and alert on anomalous or newly added sensitive variables.
  • Access auditing: Use cloud and SaaS audit logs to detect suspicious usage of credentials that may have been exposed via remote command environments.

Sources

SourceLink
github.comgithub.com/openclaw/crabbox/commit/eaae40ae4ce009e60633f16f7f19600c74557f6f
github.comgithub.com/openclaw/crabbox/pull/78
github.comgithub.com/openclaw/crabbox/releases/tag/v0.12.0
vulncheck.comvulncheck.com/advisories/crabbox-environment-variable-information-disclosure

Frequently asked

questions

Yes, in a practical sense. An attacker who controls or influences a repository's Crabbox configuration can cause local secrets to be sent to a remote environment when a user or CI job runs Crabbox against that repository.

The attacker needs the ability to modify or introduce the repo-local Crabbox configuration, such as owning the repository, compromising it, or getting a malicious configuration merged via a pull request in an insufficiently reviewed project.

The most robust fix is to centralize control over which environment variables may be forwarded, using a strict, minimal allowlist that is defined outside of repositories, and to default to not forwarding secrets at all.

Treat repository-controlled configuration as untrusted, ensure remote execution tools cannot be instructed by untrusted config to forward arbitrary environment data, minimize credentials present in local and CI environments, and enforce automated policy checks on configuration that interacts with remote execution.

Find out what's already
exploitable in your codebase.